mirror of
https://gitee.com/hzchunfen/erp.git
synced 2025-12-01 14:40:44 +00:00
2022-8-12-提交
This commit is contained in:
parent
a8234cdbba
commit
6d20a5648c
@ -4,13 +4,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getToken } from "@/util/auth";
|
// import { getToken } from "@/util/auth";
|
||||||
export default {
|
export default {
|
||||||
created() {
|
// created() {
|
||||||
if (!getToken()) {
|
// if (!getToken()) {
|
||||||
this.$router.push({ name: "logo" });
|
// this.$router.push({ name: "Login" });
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
9
resources/frontend/src/UploadExcel/index.vue
Normal file
9
resources/frontend/src/UploadExcel/index.vue
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<UploadExcel :on-success="handleSuccess" :before-upload="beforeUpload" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
</script>
|
||||||
59
resources/frontend/src/api/goods.js
vendored
59
resources/frontend/src/api/goods.js
vendored
@ -1,40 +1,59 @@
|
|||||||
import http from '@/util/http.js'
|
import http from "@/util/http.js";
|
||||||
|
|
||||||
// 商品管理列表
|
// 商品管理列表
|
||||||
export function goods (data) {
|
export function goods(params) {
|
||||||
return http({
|
return http({
|
||||||
url: '/api/goods_skus',
|
url: "/api/goods_skus",
|
||||||
method: 'get',
|
method: "get",
|
||||||
data
|
params,
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
// 新建商品
|
// 新建商品
|
||||||
export function addGoods(data) {
|
export function addGoods(data) {
|
||||||
return http({
|
return http({
|
||||||
url: '/api/goods',
|
url: "/api/goods",
|
||||||
method: 'post',
|
method: "post",
|
||||||
data
|
data,
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
// 查看商品
|
// 查看商品
|
||||||
export function checkGoods(id) {
|
export function checkGoods(id) {
|
||||||
return http({
|
return http({
|
||||||
url: `/api/goods_skus/${id}`,
|
url: `/api/goods_skus/${id}`,
|
||||||
method: 'get'
|
method: "get",
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
// 商品列表
|
// 商品列表
|
||||||
export function goodsList () {
|
export function goodsList(params) {
|
||||||
return http({
|
return http({
|
||||||
url: '/api/goods',
|
url: "/api/goods",
|
||||||
method: 'get'
|
method: "get",
|
||||||
})
|
params,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
// 更新商品
|
// 更新商品
|
||||||
export function updateGoods (id, data) {
|
export function updateGoods(id, params) {
|
||||||
return http({
|
return http({
|
||||||
url: `/api/goods_skus/${id}`,
|
url: `/api/goods_skus/${id}`,
|
||||||
method: 'patch',
|
method: "patch",
|
||||||
data
|
params,
|
||||||
})
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 上新/库存盘点/库存
|
||||||
|
export function update(data) {
|
||||||
|
return http({
|
||||||
|
url: "/api/batch/goods_skus",
|
||||||
|
method: "patch",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 单个字段更新
|
||||||
|
export function singleUpdate(id, data) {
|
||||||
|
return http({
|
||||||
|
url: `/api/single/goods_skus/${id}`,
|
||||||
|
method: "patch",
|
||||||
|
data,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
11
resources/frontend/src/api/record.js
vendored
Normal file
11
resources/frontend/src/api/record.js
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import http from "@/util/http.js";
|
||||||
|
|
||||||
|
// 单品日志记录请求
|
||||||
|
|
||||||
|
export function recordList(params) {
|
||||||
|
return http({
|
||||||
|
url: "/api/logs",
|
||||||
|
method: "get",
|
||||||
|
params,
|
||||||
|
});
|
||||||
|
}
|
||||||
35
resources/frontend/src/api/role.js
vendored
Normal file
35
resources/frontend/src/api/role.js
vendored
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
import http from "@/util/http.js";
|
||||||
|
|
||||||
|
// 角色管理页面请求
|
||||||
|
export function roleList() {
|
||||||
|
return http({
|
||||||
|
url: "/api/roles",
|
||||||
|
method: "get",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 角色新增请求
|
||||||
|
export function roleAdd(data) {
|
||||||
|
return http({
|
||||||
|
url: "/api/roles",
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 角色权限列表请求
|
||||||
|
export function jurisdiction() {
|
||||||
|
return http({
|
||||||
|
url: "/api/permissions",
|
||||||
|
method: "get",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 角色权限编辑
|
||||||
|
export function jurisdictionEdit(id, data) {
|
||||||
|
return http({
|
||||||
|
url: `/api/roles/${id}/permissions`,
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
29
resources/frontend/src/api/shop.js
vendored
29
resources/frontend/src/api/shop.js
vendored
@ -1,24 +1,27 @@
|
|||||||
import http from '@/util/http.js'
|
import http from "@/util/http.js";
|
||||||
// 店铺平台列表
|
|
||||||
|
// 店铺管理页面请求
|
||||||
|
|
||||||
|
// 店铺平台
|
||||||
export function shopListId() {
|
export function shopListId() {
|
||||||
return http({
|
return http({
|
||||||
url: '/api/shop_platforms',
|
url: "/api/shop_platforms",
|
||||||
method: 'get'
|
method: "get",
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
// 店铺新增
|
// 店铺新增
|
||||||
export function shopAdd(data) {
|
export function shopAdd(data) {
|
||||||
return http({
|
return http({
|
||||||
url: '/api/shops',
|
url: "/api/shops",
|
||||||
method: 'post',
|
method: "post",
|
||||||
data
|
data,
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
// 店铺列表
|
// 店铺列表
|
||||||
export function storeList(data) {
|
export function storeList(data) {
|
||||||
return http({
|
return http({
|
||||||
url: '/api/shops',
|
url: "/api/shops",
|
||||||
method: 'get',
|
method: "get",
|
||||||
data
|
data,
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
45
resources/frontend/src/api/user.js
vendored
Normal file
45
resources/frontend/src/api/user.js
vendored
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
import http from "@/util/http.js";
|
||||||
|
|
||||||
|
//用户管理列表请求
|
||||||
|
|
||||||
|
// 角色列表请求
|
||||||
|
export function roleList() {
|
||||||
|
return http({
|
||||||
|
url: "/api/roles",
|
||||||
|
method: "get",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//用户列表请求
|
||||||
|
export function userList() {
|
||||||
|
return http({
|
||||||
|
url: "/api/users",
|
||||||
|
method: "get",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//用户新增请求
|
||||||
|
export function userAdd(data) {
|
||||||
|
return http({
|
||||||
|
url: "/api/users",
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 用户管理点击编辑请求
|
||||||
|
export function userEdit(id) {
|
||||||
|
return http({
|
||||||
|
url: `/api/users/${id}`,
|
||||||
|
method: "get",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//编辑完确认请求
|
||||||
|
export function userConfirm(id, data) {
|
||||||
|
return http({
|
||||||
|
url: `/api/users/${id}`,
|
||||||
|
method: "patch",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
@ -8,12 +8,13 @@
|
|||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-upload name="image"
|
<el-upload
|
||||||
|
name="image"
|
||||||
:action="uploadAction"
|
:action="uploadAction"
|
||||||
:headers="uploadHeaders"
|
:headers="uploadHeaders"
|
||||||
:on-preview="handleChange"
|
:on-preview="handleChange"
|
||||||
:on-remove="beforeRemove"
|
:on-remove="beforeRemove"
|
||||||
:on-success='good'
|
:on-success="good"
|
||||||
:file-list="img"
|
:file-list="img"
|
||||||
:limit="number"
|
:limit="number"
|
||||||
:before-upload="handleBeforeUpload"
|
:before-upload="handleBeforeUpload"
|
||||||
@ -21,27 +22,27 @@
|
|||||||
accept=".png,.jpg"
|
accept=".png,.jpg"
|
||||||
list-type="picture-card"
|
list-type="picture-card"
|
||||||
:class="hideUploadEdit ? 'hide' : ''"
|
:class="hideUploadEdit ? 'hide' : ''"
|
||||||
:show-file-list='true'>
|
:show-file-list="true"
|
||||||
|
>
|
||||||
<i class="el-icon-plus"></i>
|
<i class="el-icon-plus"></i>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
|
|
||||||
<div class="demo-image__preview"
|
<div class="demo-image__preview" v-if="imageUrl">
|
||||||
v-if='imageUrl'>
|
<el-image
|
||||||
<el-image class="hidden__el-image"
|
class="hidden__el-image"
|
||||||
ref="elImage"
|
ref="elImage"
|
||||||
:src="imageUrl"
|
:src="imageUrl"
|
||||||
:preview-src-list="previewSrcList">
|
:preview-src-list="previewSrcList"
|
||||||
|
>
|
||||||
</el-image>
|
</el-image>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getToken } from '@/util/auth'
|
import { getToken } from "@/util/auth";
|
||||||
export default {
|
export default {
|
||||||
name: '', // 页面名称
|
name: "", // 页面名称
|
||||||
components: {}, // 挂载组件
|
components: {}, // 挂载组件
|
||||||
props: {
|
props: {
|
||||||
// 上传图片数量
|
// 上传图片数量
|
||||||
@ -57,45 +58,45 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
hideUploadEdit: false, // 判断显示图片上传限制隐藏
|
hideUploadEdit: false, // 判断显示图片上传限制隐藏
|
||||||
url: '/api/upload', // 请求接口
|
url: "/api/upload", // 请求接口
|
||||||
imageUrl: '', // 图片展示
|
imageUrl: "", // 图片展示
|
||||||
previewSrcList: [], // 展示图片列表
|
previewSrcList: [], // 展示图片列表
|
||||||
list: [], // 上传图片列表
|
list: [], // 上传图片列表
|
||||||
img: [], // 实际展示的图片
|
img: [], // 实际展示的图片
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
// 上传的地址
|
// 上传的地址
|
||||||
uploadAction() {
|
uploadAction() {
|
||||||
return 'https://ct-upimg.yx090.com' + this.url
|
return "https://ct-upimg.yx090.com" + this.url;
|
||||||
},
|
},
|
||||||
// 设置上传的请求头部
|
// 设置上传的请求头部
|
||||||
uploadHeaders() {
|
uploadHeaders() {
|
||||||
return {
|
return {
|
||||||
// authorization: 'Bearer' + getToken(),
|
// authorization: 'Bearer' + getToken(),
|
||||||
'Content-Type': 'multipart/form-data',
|
"Content-Type": "multipart/form-data",
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
}, // 计算机属性 类似与data概念
|
}, // 计算机属性 类似与data概念
|
||||||
watch: {
|
watch: {
|
||||||
file: {
|
file: {
|
||||||
handler(val) {
|
handler(val) {
|
||||||
if (val) {
|
if (val) {
|
||||||
console.log(val, 'ppp')
|
// console.log(val, 'ppp')
|
||||||
var imges = []
|
var imges = [];
|
||||||
val.forEach((element) => {
|
val.forEach((element) => {
|
||||||
imges = element.url.split(',')
|
imges = element.url.split(",");
|
||||||
this.list = imges
|
this.list = imges;
|
||||||
})
|
});
|
||||||
imges.forEach((element) => {
|
imges.forEach((element) => {
|
||||||
this.img.push({ url: this.computedGetPictureSrc(element) })
|
this.img.push({ url: this.computedGetPictureSrc(element) });
|
||||||
})
|
});
|
||||||
const previewSrcList = imges.map((ele) => {
|
const previewSrcList = imges.map((ele) => {
|
||||||
return this.computedGetPictureSrc(ele)
|
return this.computedGetPictureSrc(ele);
|
||||||
})
|
});
|
||||||
this.previewSrcList = previewSrcList
|
this.previewSrcList = previewSrcList;
|
||||||
if (val.length === this.number) {
|
if (val.length === this.number) {
|
||||||
this.hideUploadEdit = true
|
this.hideUploadEdit = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -105,7 +106,7 @@ export default {
|
|||||||
}, // 监控data中数据变化
|
}, // 监控data中数据变化
|
||||||
methods: {
|
methods: {
|
||||||
computedGetPictureSrc(src) {
|
computedGetPictureSrc(src) {
|
||||||
return 'https://ct-upimg.yx090.com/' + src
|
return "https://ct-upimg.yx090.com/" + src;
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* @author: czw (725551805@qq.com)
|
* @author: czw (725551805@qq.com)
|
||||||
@ -117,7 +118,7 @@ export default {
|
|||||||
*/
|
*/
|
||||||
handleEditChange(file, fileList) {
|
handleEditChange(file, fileList) {
|
||||||
if (fileList.length === this.number) {
|
if (fileList.length === this.number) {
|
||||||
this.hideUploadEdit = true
|
this.hideUploadEdit = true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@ -128,13 +129,13 @@ export default {
|
|||||||
* @Date: 2022-03-03 19:59:45
|
* @Date: 2022-03-03 19:59:45
|
||||||
*/
|
*/
|
||||||
good(file, fileList) {
|
good(file, fileList) {
|
||||||
this.previewSrcList.push(fileList.url)
|
this.previewSrcList.push(fileList.url);
|
||||||
console.log(this.previewSrcList, '------')
|
console.log(this.previewSrcList, "------");
|
||||||
// file.data.forEach((element) => {
|
// file.data.forEach((element) => {
|
||||||
// this.list.push(element.url)
|
// this.list.push(element.url)
|
||||||
// })
|
// })
|
||||||
|
|
||||||
this.$emit('urlimg', fileList.url)
|
this.$emit("urlimg", fileList.url);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* @author: czw (725551805@qq.com)
|
* @author: czw (725551805@qq.com)
|
||||||
@ -144,10 +145,10 @@ export default {
|
|||||||
* @Date: 2022-03-03 18:59:28
|
* @Date: 2022-03-03 18:59:28
|
||||||
*/
|
*/
|
||||||
handleChange(file) {
|
handleChange(file) {
|
||||||
this.imageUrl = file.url
|
this.imageUrl = file.url;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.elImage.clickHandler()
|
this.$refs.elImage.clickHandler();
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* @author: czw (725551805@qq.com)
|
* @author: czw (725551805@qq.com)
|
||||||
@ -158,23 +159,23 @@ export default {
|
|||||||
*/
|
*/
|
||||||
beforeRemove(file, fileList) {
|
beforeRemove(file, fileList) {
|
||||||
if (fileList.length === this.number) {
|
if (fileList.length === this.number) {
|
||||||
this.hideUploadEdit = true
|
this.hideUploadEdit = true;
|
||||||
} else {
|
} else {
|
||||||
this.hideUploadEdit = false
|
this.hideUploadEdit = false;
|
||||||
}
|
}
|
||||||
if (file.response) {
|
if (file.response) {
|
||||||
file.response.data.forEach((element) => {
|
file.response.data.forEach((element) => {
|
||||||
for (var i = 0; i < this.list.length; i++) {
|
for (var i = 0; i < this.list.length; i++) {
|
||||||
if (element.url === this.list[i]) {
|
if (element.url === this.list[i]) {
|
||||||
this.list.splice(i, 1)
|
this.list.splice(i, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
console.log(file, 'iiii')
|
console.log(file, "iiii");
|
||||||
for (var i = 0; i < this.list.length; i++) {
|
for (var i = 0; i < this.list.length; i++) {
|
||||||
if (file.url === this.computedGetPictureSrc(this.list[i])) {
|
if (file.url === this.computedGetPictureSrc(this.list[i])) {
|
||||||
this.list.splice(i, 1)
|
this.list.splice(i, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -187,14 +188,14 @@ export default {
|
|||||||
* @Date: 2022-03-03 19:53:25
|
* @Date: 2022-03-03 19:53:25
|
||||||
*/
|
*/
|
||||||
handleBeforeUpload(file) {
|
handleBeforeUpload(file) {
|
||||||
const isLt2M = file.size / 1024 / 1024 < 2
|
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||||
if (!isLt2M) {
|
if (!isLt2M) {
|
||||||
this.$message.error('上传头像图片大小不能超过 2MB!')
|
this.$message.error("上传头像图片大小不能超过 2MB!");
|
||||||
return false
|
return false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}, // 挂载一些方法
|
}, // 挂载一些方法
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|||||||
BIN
resources/frontend/src/css/img/编辑.png
Normal file
BIN
resources/frontend/src/css/img/编辑.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 348 B |
BIN
resources/frontend/src/css/img/编辑@2x.png
Normal file
BIN
resources/frontend/src/css/img/编辑@2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 560 B |
28
resources/frontend/src/main.js
vendored
28
resources/frontend/src/main.js
vendored
@ -1,13 +1,12 @@
|
|||||||
import Vue from 'vue'
|
import Vue from "vue";
|
||||||
import App from './App.vue'
|
import App from "./App.vue";
|
||||||
import router from './router'
|
import router from "./router";
|
||||||
import store from './store'
|
import store from "./store";
|
||||||
import ElementUI from 'element-ui'
|
import ElementUI from "element-ui";
|
||||||
import 'element-ui/lib/theme-chalk/index.css'
|
import "element-ui/lib/theme-chalk/index.css";
|
||||||
import '@/css/style.css'
|
import "@/css/style.css";
|
||||||
import './router/index2'
|
import "./router/index2";
|
||||||
import axios from 'axios'
|
import axios from "axios";
|
||||||
|
|
||||||
|
|
||||||
// import Router from 'vue-router'
|
// import Router from 'vue-router'
|
||||||
// const routerPush = Router.prototype.push
|
// const routerPush = Router.prototype.push
|
||||||
@ -15,12 +14,11 @@ import axios from 'axios'
|
|||||||
// return routerPush.call(this, location).catch(error=> error)
|
// return routerPush.call(this, location).catch(error=> error)
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
Vue.use(ElementUI);
|
||||||
Vue.use(ElementUI)
|
Vue.config.productionTip = false;
|
||||||
Vue.config.productionTip = false
|
|
||||||
|
|
||||||
new Vue({
|
new Vue({
|
||||||
router,
|
router,
|
||||||
store,
|
store,
|
||||||
render: h => h(App)
|
render: (h) => h(App),
|
||||||
}).$mount('#app')
|
}).$mount("#app");
|
||||||
|
|||||||
16
resources/frontend/src/router/index.js
vendored
16
resources/frontend/src/router/index.js
vendored
@ -1,5 +1,6 @@
|
|||||||
import Vue from "vue";
|
import Vue from "vue";
|
||||||
import VueRouter from "vue-router";
|
import VueRouter from "vue-router";
|
||||||
|
import axios from "axios";
|
||||||
|
|
||||||
Vue.use(VueRouter);
|
Vue.use(VueRouter);
|
||||||
|
|
||||||
@ -11,12 +12,17 @@ const createRouter = () =>
|
|||||||
const router = createRouter();
|
const router = createRouter();
|
||||||
|
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
if (localStorage.getItem("token")) {
|
// console.log(to,next);
|
||||||
next();
|
const token = localStorage.getItem("token");
|
||||||
} else if (to.fullPath === "/logo") {
|
// 目标路由不是登录页,并且还需要token验证,还没有token,那就直接给返回到登录页
|
||||||
next();
|
if (to.name !== "Login" && !token) {
|
||||||
|
next({ name: "Login" });
|
||||||
} else {
|
} else {
|
||||||
next("/logo");
|
// 目标路由是登录页-自然不需要token验证
|
||||||
|
// 或目标路由不需要身份验证
|
||||||
|
// 又或目标路由非登录页,需要token验证,但是有token
|
||||||
|
// next放行
|
||||||
|
next();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
87
resources/frontend/src/router/index1.js
vendored
87
resources/frontend/src/router/index1.js
vendored
@ -1,68 +1,73 @@
|
|||||||
const list = [
|
const list = [
|
||||||
{
|
{
|
||||||
path: '/logo',
|
path: "/Login",
|
||||||
name: 'logo',
|
name: "Login",
|
||||||
component: () => import('../views/logo.vue')
|
component: () => import("../views/Login.vue"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/',
|
path: "/",
|
||||||
component: () => import('../views/index.vue'),
|
component: () => import("../views/index.vue"),
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'GOODS_LIST',
|
path: "GOODS_LIST",
|
||||||
name: '商品列表',
|
name: "商品列表",
|
||||||
component: () => import('../views/yingyeting/yingyeting.vue')
|
component: () => import("../views/yingyeting/yingyeting.vue"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'GOODS_TYPE',
|
path: "GOODS_TYPE",
|
||||||
name: '商品种类',
|
name: "商品种类",
|
||||||
component: () => import('../views/home/home.vue')
|
component: () => import("../views/home/home.vue"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'GOODS_BRAND',
|
path: "GOODS_BRAND",
|
||||||
name: '商品品牌',
|
name: "商品品牌",
|
||||||
component: () => import('../views/brand/brand.vue')
|
component: () => import("../views/brand/brand.vue"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'SHOP_MANAGE',
|
path: "SHOP_MANAGE",
|
||||||
name: '店铺管理',
|
name: "店铺管理",
|
||||||
component: () => import('../views/store/store.vue')
|
component: () => import("../views/store/store.vue"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'USER_MANAGE',
|
path: "USER_MANAGE",
|
||||||
name: '用户管理',
|
name: "用户管理",
|
||||||
component: () => import('../views/users/users.vue')
|
component: () => import("../views/users/users.vue"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'ROLE_MANAGE',
|
path: "ROLE_MANAGE",
|
||||||
name: '角色管理',
|
name: "角色管理",
|
||||||
component: () => import('../views/system/role.vue')
|
component: () => import("../views/system/role.vue"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'PERMISSION_MANAGE',
|
path: "PERMISSION_MANAGE",
|
||||||
name: '权限管理',
|
name: "权限管理",
|
||||||
component: () => import('../views/system/authority.vue')
|
component: () => import("../views/system/authority.vue"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'SYSTEM_LOG',
|
path: "SYSTEM_LOG",
|
||||||
name: '商品记录',
|
name: "系统日志",
|
||||||
component: () => import('../views/shuju/shuju.vue')
|
component: () => import("../views/shuju/shuju.vue"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/index/yingyeting/addgoods',
|
path: "GOODS_LOG",
|
||||||
name: '新建商品',
|
name: "商品记录",
|
||||||
component: () => import('../views/yingyeting/addgoods/addgoods.vue')
|
component: () => import("../views/shuju/record.vue"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/',
|
path: "/index/yingyeting/addgoods",
|
||||||
redirect: 'GOODS_LIST'
|
name: "新建商品",
|
||||||
}
|
component: () => import("../views/yingyeting/addgoods/addgoods.vue"),
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/',
|
path: "/",
|
||||||
redirect: '/index'
|
redirect: "GOODS_LIST",
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/",
|
||||||
|
redirect: "/index",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
export default list
|
export default list;
|
||||||
|
|||||||
8
resources/frontend/src/util/auth.js
vendored
8
resources/frontend/src/util/auth.js
vendored
@ -1,13 +1,13 @@
|
|||||||
const TokenKey = 'admin_token'
|
const TokenKey = "admin_token";
|
||||||
// 获取token
|
// 获取token
|
||||||
export function getToken() {
|
export function getToken() {
|
||||||
return 'w1rr6IsxZIud46dIrGIivNAroFpqN52sSpXhk3azpPq2ZTbUXhgKTOLheoRm'
|
return localStorage.getItem("token");
|
||||||
}
|
}
|
||||||
// 设置token
|
// 设置token
|
||||||
export function setToken(token) {
|
export function setToken(token) {
|
||||||
return localStorage.setItem(TokenKey, token)
|
return localStorage.setItem(TokenKey, token);
|
||||||
}
|
}
|
||||||
// 删除token
|
// 删除token
|
||||||
export function removeToken() {
|
export function removeToken() {
|
||||||
return localStorage.removeItem(TokenKey)
|
return localStorage.removeItem(TokenKey);
|
||||||
}
|
}
|
||||||
|
|||||||
64
resources/frontend/src/util/http.js
vendored
64
resources/frontend/src/util/http.js
vendored
@ -6,59 +6,61 @@
|
|||||||
* @LastEditTime: 2022-03-13 11:05:08
|
* @LastEditTime: 2022-03-13 11:05:08
|
||||||
* @FilePath: /glxt/src/util/http.js
|
* @FilePath: /glxt/src/util/http.js
|
||||||
*/
|
*/
|
||||||
import axios from 'axios'
|
import axios from "axios";
|
||||||
import { getToken } from '@/util/auth'
|
import { getToken } from "@/util/auth";
|
||||||
import NProgress from 'nprogress'
|
import NProgress from "nprogress";
|
||||||
import 'nprogress/nprogress.css'
|
import "nprogress/nprogress.css";
|
||||||
import { Message } from 'element-ui'
|
import { Message } from "element-ui";
|
||||||
import router from '@/router'
|
import router from "@/router";
|
||||||
var instance = axios.create({
|
var instance = axios.create({
|
||||||
|
timeout: 10000,
|
||||||
timeout: 10000
|
});
|
||||||
})
|
|
||||||
|
|
||||||
instance.interceptors.request.use(
|
instance.interceptors.request.use(
|
||||||
config => {
|
(config) => {
|
||||||
// config.headers['content-type'] = 'application/json'
|
// config.headers['content-type'] = 'application/json'
|
||||||
|
|
||||||
// config.headers['Shop-Id'] = localStorage.getItem('shopId') || 1
|
// config.headers['Shop-Id'] = localStorage.getItem('shopId') || 1
|
||||||
|
|
||||||
// 在发送请求之前做些什么
|
// 在发送请求之前做些什么
|
||||||
// config.headers.Authorization = 'Bearer' + getToken() // 请求头
|
// config.headers.Authorization = "Bearer" + getToken(); // 请求头
|
||||||
// config.headers['content-type'] = 'application/json'
|
// config.headers['content-type'] = 'application/json'
|
||||||
config.headers.Authorization = 'Bearer ' + getToken() // 请求头
|
config.headers.Authorization = "Bearer " + getToken(); // 请求头
|
||||||
NProgress.start()
|
NProgress.start();
|
||||||
// console.log(config, '1111') // for debug
|
// console.log(config, '1111') // for debug
|
||||||
|
|
||||||
return config
|
return config;
|
||||||
},
|
},
|
||||||
error => {
|
(error) => {
|
||||||
// 对请求错误做些什么
|
// 对请求错误做些什么
|
||||||
console.log(error, '222222') // for debug
|
console.log(error, "222222"); // for debug
|
||||||
return Promise.reject(error)
|
return Promise.reject(error);
|
||||||
}
|
}
|
||||||
)
|
);
|
||||||
|
|
||||||
// 添加响应拦截器
|
// 添加响应拦截器
|
||||||
instance.interceptors.response.use(
|
instance.interceptors.response.use(
|
||||||
response => {
|
(response) => {
|
||||||
NProgress.done()
|
NProgress.done();
|
||||||
const res = response.status
|
const res = response.status;
|
||||||
// 对响应数据做点什么
|
// 对响应数据做点什么
|
||||||
// console.log(response, '33333') // for debug
|
// console.log(response, '33333') // for debug
|
||||||
if (res === 200 || res === 201) {
|
if (res === 200 || res === 201) {
|
||||||
return response
|
return response;
|
||||||
} else {
|
} else {
|
||||||
Message({
|
Message({
|
||||||
message: 'Error',
|
message: "Error",
|
||||||
type: 'error'
|
type: "error",
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error => {
|
(error) => {
|
||||||
// 对响应错误做点什么
|
// 对响应错误做点什么
|
||||||
|
Message({
|
||||||
console.log(error, '44444') // for debug
|
message: error,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
console.log(error, "44444"); // for debug
|
||||||
// if (error.response.status === 401) {
|
// if (error.response.status === 401) {
|
||||||
// Message({
|
// Message({
|
||||||
// message: '账户登录过期,请重新登录',
|
// message: '账户登录过期,请重新登录',
|
||||||
@ -74,8 +76,8 @@ instance.interceptors.response.use(
|
|||||||
// })
|
// })
|
||||||
// }
|
// }
|
||||||
|
|
||||||
return Promise.reject(error)
|
return Promise.reject(error);
|
||||||
}
|
}
|
||||||
)
|
);
|
||||||
|
|
||||||
export default instance
|
export default instance;
|
||||||
|
|||||||
@ -37,7 +37,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
Login() {
|
Login() {
|
||||||
// 判断复选框是否被勾选 勾选则调用配置cookie方法
|
// 判断记住密码复选框是否被勾选 勾选则调用配置cookie方法
|
||||||
if (this.checked === true) {
|
if (this.checked === true) {
|
||||||
this.setCookie(this.form.name, this.form.password, true, 7);
|
this.setCookie(this.form.name, this.form.password, true, 7);
|
||||||
} else {
|
} else {
|
||||||
@ -50,16 +50,8 @@ export default {
|
|||||||
type: "error",
|
type: "error",
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
let token = localStorage.getItem("token");
|
// let token = localStorage.getItem("token");
|
||||||
axios
|
axios.post("/api/auth/login", this.form).then((res) => {
|
||||||
.post("/api/auth/login", this.form, {
|
|
||||||
headers: {
|
|
||||||
Authorization:
|
|
||||||
"Bearer w1rr6IsxZIud46dIrGIivNAroFpqN52sSpXhk3azpPq2ZTbUXhgKTOLheoRm",
|
|
||||||
token: token,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
.then((res) => {
|
|
||||||
let data = res.data;
|
let data = res.data;
|
||||||
console.log(data);
|
console.log(data);
|
||||||
if (data.error) {
|
if (data.error) {
|
||||||
@ -79,7 +71,7 @@ export default {
|
|||||||
message: "成功登录,欢迎来到后台管理系统",
|
message: "成功登录,欢迎来到后台管理系统",
|
||||||
type: "success",
|
type: "success",
|
||||||
});
|
});
|
||||||
this.$router.push("/USER_MANAGE");
|
this.$router.push("/GOODS_LIST");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -29,9 +29,9 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 新增种类对话框 -->
|
<!-- 新增种类对话框 -->
|
||||||
<el-dialog title="新增种类" :visible.sync="dialogFormVisible">
|
<el-dialog title="新增品牌" :visible.sync="dialogFormVisible">
|
||||||
<el-form :model="form">
|
<el-form :model="form">
|
||||||
<el-form-item label="商品种类" :label-width="formLabelWidth">
|
<el-form-item label="商品品牌" :label-width="formLabelWidth">
|
||||||
<el-input v-model="form.kindName" autocomplete="off"></el-input>
|
<el-input v-model="form.kindName" autocomplete="off"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@ -72,7 +72,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
// Brand_goods_types,
|
Brand_goods_types,
|
||||||
DelBrand_goods_types,
|
DelBrand_goods_types,
|
||||||
AddBrandgoods_types,
|
AddBrandgoods_types,
|
||||||
editBrand_types,
|
editBrand_types,
|
||||||
@ -113,13 +113,11 @@ export default {
|
|||||||
handleSizeChange(val) {
|
handleSizeChange(val) {
|
||||||
//当前条数
|
//当前条数
|
||||||
this.per_page = val;
|
this.per_page = val;
|
||||||
console.log(1111, val);
|
|
||||||
this.getGoods_types();
|
this.getGoods_types();
|
||||||
},
|
},
|
||||||
handleCurrentChange(val) {
|
handleCurrentChange(val) {
|
||||||
//当前页
|
//当前页
|
||||||
this.current_page = val;
|
this.current_page = val;
|
||||||
console.log(2222, val);
|
|
||||||
this.getGoods_types();
|
this.getGoods_types();
|
||||||
},
|
},
|
||||||
// 新增
|
// 新增
|
||||||
@ -146,7 +144,7 @@ export default {
|
|||||||
// 编辑
|
// 编辑
|
||||||
handEdit(id, item) {
|
handEdit(id, item) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
console.log("item", item);
|
// console.log("item", item);
|
||||||
this.form1.kindName1 = item.name;
|
this.form1.kindName1 = item.name;
|
||||||
this.dialogFormVisible1 = true;
|
this.dialogFormVisible1 = true;
|
||||||
},
|
},
|
||||||
@ -165,7 +163,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
handdel(id) {
|
handdel(id) {
|
||||||
this.$confirm("确定删除此条商品种类吗?", "确认删除", {
|
this.$confirm("确定删除此条商品品牌吗?", "确认删除", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning",
|
type: "warning",
|
||||||
@ -188,31 +186,11 @@ export default {
|
|||||||
},
|
},
|
||||||
// 获取列表
|
// 获取列表
|
||||||
getGoods_types() {
|
getGoods_types() {
|
||||||
// Brand_goods_types({
|
let page = {
|
||||||
// // page: this.current_page,
|
|
||||||
// // per_page: this.per_page,
|
|
||||||
// data: {
|
|
||||||
// page: this.current_page,
|
|
||||||
// per_page: this.per_page,
|
|
||||||
// },
|
|
||||||
// }).then((res) => {
|
|
||||||
// console.log(res);
|
|
||||||
// this.tableData = res.data.data;
|
|
||||||
// this.Paginationdata = res.data.data.length;
|
|
||||||
// });
|
|
||||||
axios
|
|
||||||
.get("/api/goods_brands", {
|
|
||||||
headers: {
|
|
||||||
Authorization:
|
|
||||||
"Bearer w1rr6IsxZIud46dIrGIivNAroFpqN52sSpXhk3azpPq2ZTbUXhgKTOLheoRm",
|
|
||||||
},
|
|
||||||
params: {
|
|
||||||
page: this.current_page,
|
page: this.current_page,
|
||||||
per_page: this.per_page,
|
per_page: this.per_page,
|
||||||
},
|
};
|
||||||
})
|
Brand_goods_types(page).then((res) => {
|
||||||
.then((res) => {
|
|
||||||
// console.log(res);
|
|
||||||
this.tableData = res.data.data;
|
this.tableData = res.data.data;
|
||||||
this.Paginationdata = res.data.meta;
|
this.Paginationdata = res.data.meta;
|
||||||
});
|
});
|
||||||
|
|||||||
@ -73,7 +73,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
// goods_types,
|
goods_types,
|
||||||
Delgoods_types,
|
Delgoods_types,
|
||||||
Addgoods_types,
|
Addgoods_types,
|
||||||
editGoods_types,
|
editGoods_types,
|
||||||
@ -115,13 +115,11 @@ export default {
|
|||||||
handleSizeChange(val) {
|
handleSizeChange(val) {
|
||||||
//当前条数
|
//当前条数
|
||||||
this.per_page = val;
|
this.per_page = val;
|
||||||
console.log(1111, val);
|
|
||||||
this.getGoods_types();
|
this.getGoods_types();
|
||||||
},
|
},
|
||||||
handleCurrentChange(val) {
|
handleCurrentChange(val) {
|
||||||
//当前页
|
//当前页
|
||||||
this.current_page = val;
|
this.current_page = val;
|
||||||
console.log(2222, val);
|
|
||||||
this.getGoods_types();
|
this.getGoods_types();
|
||||||
},
|
},
|
||||||
// 新增
|
// 新增
|
||||||
@ -148,7 +146,7 @@ export default {
|
|||||||
// 编辑
|
// 编辑
|
||||||
handEdit(id, item) {
|
handEdit(id, item) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
console.log("item", item);
|
// console.log("item", item);
|
||||||
this.form1.kindName1 = item.name;
|
this.form1.kindName1 = item.name;
|
||||||
this.dialogFormVisible1 = true;
|
this.dialogFormVisible1 = true;
|
||||||
},
|
},
|
||||||
@ -190,29 +188,11 @@ export default {
|
|||||||
},
|
},
|
||||||
// 获取列表
|
// 获取列表
|
||||||
getGoods_types() {
|
getGoods_types() {
|
||||||
// goods_types({
|
let page = {
|
||||||
// page: this.page,
|
|
||||||
// per_page: this.per_page,
|
|
||||||
// }).then((res) => {
|
|
||||||
// console.log('res=>>>>>>>>', res)
|
|
||||||
// this.tableData = res.data.data
|
|
||||||
// this.total = res.data.data.length
|
|
||||||
// this.page = res.meta.current_page
|
|
||||||
// this.per_page = res.meta.per_page
|
|
||||||
// })
|
|
||||||
axios
|
|
||||||
.get("/api/goods_types", {
|
|
||||||
headers: {
|
|
||||||
Authorization:
|
|
||||||
"Bearer w1rr6IsxZIud46dIrGIivNAroFpqN52sSpXhk3azpPq2ZTbUXhgKTOLheoRm",
|
|
||||||
},
|
|
||||||
params: {
|
|
||||||
page: this.current_page,
|
page: this.current_page,
|
||||||
per_page: this.per_page,
|
per_page: this.per_page,
|
||||||
},
|
};
|
||||||
})
|
goods_types(page).then((res) => {
|
||||||
.then((res) => {
|
|
||||||
// console.log(res);
|
|
||||||
this.tableData = res.data.data;
|
this.tableData = res.data.data;
|
||||||
this.Paginationdata = res.data.meta;
|
this.Paginationdata = res.data.meta;
|
||||||
});
|
});
|
||||||
|
|||||||
@ -7,34 +7,25 @@
|
|||||||
* @FilePath: /glxt/src/views/home/home/cesi.vue
|
* @FilePath: /glxt/src/views/home/home/cesi.vue
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div >
|
<div></div>
|
||||||
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {};
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
created () {
|
created() {},
|
||||||
|
mounted() {},
|
||||||
},
|
|
||||||
mounted () {
|
|
||||||
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
// 防止按钮多次提交
|
// 防止按钮多次提交
|
||||||
preventRepeatClick() {
|
preventRepeatClick() {
|
||||||
this.isDisabled = true
|
this.isDisabled = true;
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.isDisabled = false
|
this.isDisabled = false;
|
||||||
}, 1000)
|
}, 1000);
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
:headers="uploadHeaders"
|
:headers="uploadHeaders"
|
||||||
:on-preview="handleChange"
|
:on-preview="handleChange"
|
||||||
:on-remove="beforeRemove"
|
:on-remove="beforeRemove"
|
||||||
:on-success='good'
|
:on-success="good"
|
||||||
:file-list="img"
|
:file-list="img"
|
||||||
:limit="number"
|
:limit="number"
|
||||||
:before-upload="handleBeforeUpload"
|
:before-upload="handleBeforeUpload"
|
||||||
@ -22,12 +22,12 @@
|
|||||||
accept=".png,.jpg"
|
accept=".png,.jpg"
|
||||||
list-type="picture-card"
|
list-type="picture-card"
|
||||||
:class="hideUploadEdit ? 'hide' : ''"
|
:class="hideUploadEdit ? 'hide' : ''"
|
||||||
:show-file-list='true'
|
:show-file-list="true"
|
||||||
>
|
>
|
||||||
<i class="el-icon-plus"></i>
|
<i class="el-icon-plus"></i>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
|
|
||||||
<div class="demo-image__preview" v-if='imageUrl'>
|
<div class="demo-image__preview" v-if="imageUrl">
|
||||||
<el-image
|
<el-image
|
||||||
class="hidden__el-image"
|
class="hidden__el-image"
|
||||||
ref="elImage"
|
ref="elImage"
|
||||||
@ -38,81 +38,77 @@
|
|||||||
</div>
|
</div>
|
||||||
{{ list }}
|
{{ list }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getToken } from '@/util/auth'
|
import { getToken } from "@/util/auth";
|
||||||
export default {
|
export default {
|
||||||
name: '', // 页面名称
|
name: "", // 页面名称
|
||||||
components: {}, // 挂载组件
|
components: {}, // 挂载组件
|
||||||
props: {
|
props: {
|
||||||
// 上传图片数量
|
// 上传图片数量
|
||||||
number: {
|
number: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 1
|
default: 1,
|
||||||
},
|
},
|
||||||
file: {
|
file: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => []
|
default: () => [],
|
||||||
}
|
},
|
||||||
}, // 组件传值
|
}, // 组件传值
|
||||||
data () {
|
data() {
|
||||||
return {
|
return {
|
||||||
hideUploadEdit: false, // 判断显示图片上传限制隐藏
|
hideUploadEdit: false, // 判断显示图片上传限制隐藏
|
||||||
url: '/qiniuupload', // 请求接口
|
url: "/qiniuupload", // 请求接口
|
||||||
imageUrl: '', // 图片展示
|
imageUrl: "", // 图片展示
|
||||||
previewSrcList: [], // 展示图片列表
|
previewSrcList: [], // 展示图片列表
|
||||||
list: [], // 上传图片列表
|
list: [], // 上传图片列表
|
||||||
img: [] // 实际展示的图片
|
img: [], // 实际展示的图片
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
// 上传的地址
|
// 上传的地址
|
||||||
uploadAction () {
|
uploadAction() {
|
||||||
return 'https://dev.zonmind.com/home' + this.url
|
return "https://dev.zonmind.com/home" + this.url;
|
||||||
},
|
},
|
||||||
// 设置上传的请求头部
|
// 设置上传的请求头部
|
||||||
uploadHeaders () {
|
uploadHeaders() {
|
||||||
return {
|
return {
|
||||||
authorization: 'Bearer' + getToken()
|
authorization: "Bearer" + getToken(),
|
||||||
|
};
|
||||||
}
|
},
|
||||||
}
|
|
||||||
|
|
||||||
}, // 计算机属性 类似与data概念
|
}, // 计算机属性 类似与data概念
|
||||||
watch: {
|
watch: {
|
||||||
file: {
|
file: {
|
||||||
handler(val) {
|
handler(val) {
|
||||||
if (val) {
|
if (val) {
|
||||||
console.log(val, 'ppp')
|
// console.log(val, "ppp");
|
||||||
var imges = []
|
var imges = [];
|
||||||
val.forEach((element) => {
|
val.forEach((element) => {
|
||||||
imges = element.url.split(',')
|
imges = element.url.split(",");
|
||||||
this.list = imges
|
this.list = imges;
|
||||||
})
|
});
|
||||||
imges.forEach(element => {
|
imges.forEach((element) => {
|
||||||
this.img.push({ url: this.computedGetPictureSrc(element) })
|
this.img.push({ url: this.computedGetPictureSrc(element) });
|
||||||
})
|
});
|
||||||
const previewSrcList = imges.map((ele) => {
|
const previewSrcList = imges.map((ele) => {
|
||||||
return this.computedGetPictureSrc(ele)
|
return this.computedGetPictureSrc(ele);
|
||||||
})
|
});
|
||||||
this.previewSrcList = previewSrcList
|
this.previewSrcList = previewSrcList;
|
||||||
if (val.length === this.number) {
|
if (val.length === this.number) {
|
||||||
this.hideUploadEdit = true
|
this.hideUploadEdit = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
deep: true,
|
deep: true,
|
||||||
immediate: true
|
immediate: true,
|
||||||
}
|
},
|
||||||
|
|
||||||
}, // 监控data中数据变化
|
}, // 监控data中数据变化
|
||||||
created() {}, // 生命周期-创建完成(可以访问当前this实例)
|
created() {}, // 生命周期-创建完成(可以访问当前this实例)
|
||||||
mounted() {}, // 生命周期-挂载完成(可以访问DOM元素)
|
mounted() {}, // 生命周期-挂载完成(可以访问DOM元素)
|
||||||
methods: {
|
methods: {
|
||||||
computedGetPictureSrc(src) {
|
computedGetPictureSrc(src) {
|
||||||
return 'https://devcdn.zonmind.com' + src
|
return "https://devcdn.zonmind.com" + src;
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* @author: czw (725551805@qq.com)
|
* @author: czw (725551805@qq.com)
|
||||||
@ -124,7 +120,7 @@ export default {
|
|||||||
*/
|
*/
|
||||||
handleEditChange(file, fileList) {
|
handleEditChange(file, fileList) {
|
||||||
if (fileList.length === this.number) {
|
if (fileList.length === this.number) {
|
||||||
this.hideUploadEdit = true
|
this.hideUploadEdit = true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@ -135,12 +131,12 @@ export default {
|
|||||||
* @Date: 2022-03-03 19:59:45
|
* @Date: 2022-03-03 19:59:45
|
||||||
*/
|
*/
|
||||||
good(file, fileList) {
|
good(file, fileList) {
|
||||||
this.previewSrcList.push(fileList.url)
|
this.previewSrcList.push(fileList.url);
|
||||||
file.data.forEach(element => {
|
file.data.forEach((element) => {
|
||||||
this.list.push(element.url)
|
this.list.push(element.url);
|
||||||
})
|
});
|
||||||
|
|
||||||
this.$emit('urlimg', this.list)
|
this.$emit("urlimg", this.list);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* @author: czw (725551805@qq.com)
|
* @author: czw (725551805@qq.com)
|
||||||
@ -150,10 +146,10 @@ export default {
|
|||||||
* @Date: 2022-03-03 18:59:28
|
* @Date: 2022-03-03 18:59:28
|
||||||
*/
|
*/
|
||||||
handleChange(file) {
|
handleChange(file) {
|
||||||
this.imageUrl = file.url
|
this.imageUrl = file.url;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.elImage.clickHandler()
|
this.$refs.elImage.clickHandler();
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* @author: czw (725551805@qq.com)
|
* @author: czw (725551805@qq.com)
|
||||||
@ -164,23 +160,23 @@ export default {
|
|||||||
*/
|
*/
|
||||||
beforeRemove(file, fileList) {
|
beforeRemove(file, fileList) {
|
||||||
if (fileList.length === this.number) {
|
if (fileList.length === this.number) {
|
||||||
this.hideUploadEdit = true
|
this.hideUploadEdit = true;
|
||||||
} else {
|
} else {
|
||||||
this.hideUploadEdit = false
|
this.hideUploadEdit = false;
|
||||||
}
|
}
|
||||||
if (file.response) {
|
if (file.response) {
|
||||||
file.response.data.forEach(element => {
|
file.response.data.forEach((element) => {
|
||||||
for (var i = 0; i < this.list.length; i++) {
|
for (var i = 0; i < this.list.length; i++) {
|
||||||
if (element.url === this.list[i]) {
|
if (element.url === this.list[i]) {
|
||||||
this.list.splice(i, 1)
|
this.list.splice(i, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
console.log(file, 'iiii')
|
console.log(file, "iiii");
|
||||||
for (var i = 0; i < this.list.length; i++) {
|
for (var i = 0; i < this.list.length; i++) {
|
||||||
if (file.url === this.computedGetPictureSrc(this.list[i])) {
|
if (file.url === this.computedGetPictureSrc(this.list[i])) {
|
||||||
this.list.splice(i, 1)
|
this.list.splice(i, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -193,15 +189,14 @@ export default {
|
|||||||
* @Date: 2022-03-03 19:53:25
|
* @Date: 2022-03-03 19:53:25
|
||||||
*/
|
*/
|
||||||
handleBeforeUpload(file) {
|
handleBeforeUpload(file) {
|
||||||
const isLt2M = file.size / 1024 / 1024 < 2
|
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||||
if (!isLt2M) {
|
if (!isLt2M) {
|
||||||
this.$message.error('上传头像图片大小不能超过 2MB!')
|
this.$message.error("上传头像图片大小不能超过 2MB!");
|
||||||
return false
|
return false;
|
||||||
}
|
|
||||||
}
|
|
||||||
} // 挂载一些方法
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
}, // 挂载一些方法
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|||||||
@ -3,24 +3,26 @@
|
|||||||
<el-container>
|
<el-container>
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-aside :class="show ? 'width' : 'width1'">
|
<el-aside :class="show ? 'width' : 'width1'">
|
||||||
<el-menu router
|
<el-menu
|
||||||
background-color='#282c34'
|
router
|
||||||
text-color='#fff'
|
background-color="#282c34"
|
||||||
:default-active='$route.path'>
|
text-color="#fff"
|
||||||
<div v-for="item in menu"
|
:default-active="$route.path"
|
||||||
:key="item.id">
|
>
|
||||||
<el-menu-item :index="item.code"
|
<div v-for="item in menu" :key="item.id">
|
||||||
v-if="!item.children">
|
<el-menu-item :index="item.code" v-if="!item.children">
|
||||||
<span>{{ item.name }}</span>
|
<span>{{ item.name }}</span>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
<el-submenu v-else
|
<el-submenu v-else :index="item.code">
|
||||||
:index="item.code">
|
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
<span>{{ item.name }}</span>
|
<span>{{ item.name }}</span>
|
||||||
</template>
|
</template>
|
||||||
<el-menu-item :index="items.code"
|
<el-menu-item
|
||||||
|
:index="items.code"
|
||||||
:key="items.id"
|
:key="items.id"
|
||||||
v-for="items in item.children">{{items.name}}</el-menu-item>
|
v-for="items in item.children"
|
||||||
|
>{{ items.name }}</el-menu-item
|
||||||
|
>
|
||||||
</el-submenu>
|
</el-submenu>
|
||||||
</div>
|
</div>
|
||||||
</el-menu>
|
</el-menu>
|
||||||
@ -29,56 +31,53 @@
|
|||||||
<div class="head">
|
<div class="head">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<div @click="add"
|
<div @click="add" class="add">
|
||||||
class="add">
|
<i class="el-icon-s-unfold" v-if="show"></i>
|
||||||
<i class="el-icon-s-unfold"
|
<i class="el-icon-s-fold" v-else></i>
|
||||||
v-if="show"></i>
|
|
||||||
<i class="el-icon-s-fold"
|
|
||||||
v-else></i>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<el-breadcrumb separator-class="el-icon-arrow-right">
|
<el-breadcrumb separator-class="el-icon-arrow-right">
|
||||||
<el-breadcrumb-item v-for="(item , index) in titie"
|
<el-breadcrumb-item
|
||||||
:key="index">{{item.name}}</el-breadcrumb-item>
|
v-for="(item, index) in titie"
|
||||||
|
:key="index"
|
||||||
|
>{{ item.name }}</el-breadcrumb-item
|
||||||
|
>
|
||||||
</el-breadcrumb>
|
</el-breadcrumb>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<div class="token"
|
<div class="token" @click="hanleLogout">退出</div>
|
||||||
@click="hanleLogout">
|
|
||||||
退出
|
|
||||||
</div>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="table"
|
<div class="table" v-if="levelData.length">
|
||||||
v-if="levelData.length">
|
|
||||||
<ul>
|
<ul>
|
||||||
<li> <i class="el-icon-arrow-left"
|
<li><i class="el-icon-arrow-left" @click="hanlebottom"></i></li>
|
||||||
@click="hanlebottom"></i></li>
|
|
||||||
<li>
|
<li>
|
||||||
|
<div class="Navigation" v-if="levelData.length" id="Navigation">
|
||||||
<div class="Navigation"
|
|
||||||
v-if="levelData.length"
|
|
||||||
id="Navigation">
|
|
||||||
<div id="top"></div>
|
<div id="top"></div>
|
||||||
<div v-for="(item , index) in levelData"
|
<div
|
||||||
|
v-for="(item, index) in levelData"
|
||||||
:key="index"
|
:key="index"
|
||||||
class="tab">
|
class="tab"
|
||||||
<span :class="head===item.name?'red':''"
|
>
|
||||||
@click="handlerclick(item.path)">{{item.name}}</span>
|
<span
|
||||||
<div class="closure"
|
:class="head === item.name ? 'red' : ''"
|
||||||
|
@click="handlerclick(item.path)"
|
||||||
|
>{{ item.name }}</span
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="closure"
|
||||||
:class="head === item.name ? 'red_1' : ''"
|
:class="head === item.name ? 'red_1' : ''"
|
||||||
@click="hanblDelete(index,item.name)">
|
@click="hanblDelete(index, item.name)"
|
||||||
|
>
|
||||||
<i class="el-icon-close"></i>
|
<i class="el-icon-close"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="bottom"></div>
|
<div id="bottom"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
<li><i class="el-icon-arrow-right"
|
<li><i class="el-icon-arrow-right" @click="hanletop"></i></li>
|
||||||
@click="hanletop"></i></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="box-card">
|
<div class="box-card">
|
||||||
@ -90,13 +89,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { removeToken } from '@/util/auth'
|
import { removeToken } from "@/util/auth";
|
||||||
import { getMenu } from '../api/menu.js'
|
import { getMenu } from "../api/menu.js";
|
||||||
export default {
|
export default {
|
||||||
mounted() {
|
mounted() {
|
||||||
getMenu().then((res) => {
|
getMenu().then((res) => {
|
||||||
this.menu = res.data.data
|
this.menu = res.data.data;
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -104,28 +103,28 @@ export default {
|
|||||||
show: false, // 导航栏折叠
|
show: false, // 导航栏折叠
|
||||||
levelData: [], // table导航栏
|
levelData: [], // table导航栏
|
||||||
titie: [], // 面包线
|
titie: [], // 面包线
|
||||||
head: '', // 路由name
|
head: "", // 路由name
|
||||||
onindex: 0, // 索引
|
onindex: 0, // 索引
|
||||||
}
|
openeds: ["1"],
|
||||||
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
// table构造
|
// table构造
|
||||||
$route: {
|
$route: {
|
||||||
handler: function (val) {
|
handler: function (val) {
|
||||||
// console.log(val, 99999)
|
this.titie = val.matched;
|
||||||
this.titie = val.matched
|
this.head = val.name;
|
||||||
this.head = val.name
|
this.levelData.push({ name: val.name, path: val.path });
|
||||||
this.levelData.push({ name: val.name, path: val.path })
|
const newArr = [];
|
||||||
const newArr = []
|
const obj = {};
|
||||||
const obj = {}
|
|
||||||
for (var i = 0; i < this.levelData.length; i++) {
|
for (var i = 0; i < this.levelData.length; i++) {
|
||||||
if (!obj[this.levelData[i].name]) {
|
if (!obj[this.levelData[i].name]) {
|
||||||
newArr.push(this.levelData[i])
|
newArr.push(this.levelData[i]);
|
||||||
obj[this.levelData[i].name] = true
|
obj[this.levelData[i].name] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.levelData = newArr
|
this.levelData = newArr;
|
||||||
},
|
},
|
||||||
deep: true,
|
deep: true,
|
||||||
immediate: true,
|
immediate: true,
|
||||||
@ -140,7 +139,7 @@ export default {
|
|||||||
* @Date: 2022-03-02 19:50:50
|
* @Date: 2022-03-02 19:50:50
|
||||||
*/
|
*/
|
||||||
next() {
|
next() {
|
||||||
this.hanletop()
|
this.hanletop();
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* @author: czw (725551805@qq.com)
|
* @author: czw (725551805@qq.com)
|
||||||
@ -150,7 +149,7 @@ export default {
|
|||||||
* @Date: 2022-03-02 19:51:03
|
* @Date: 2022-03-02 19:51:03
|
||||||
*/
|
*/
|
||||||
hanletop() {
|
hanletop() {
|
||||||
document.getElementById('bottom').scrollIntoView({ behavior: 'smooth' })
|
document.getElementById("bottom").scrollIntoView({ behavior: "smooth" });
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* @author: czw (725551805@qq.com)
|
* @author: czw (725551805@qq.com)
|
||||||
@ -160,7 +159,7 @@ export default {
|
|||||||
* @Date: 2022-03-02 19:51:07
|
* @Date: 2022-03-02 19:51:07
|
||||||
*/
|
*/
|
||||||
hanlebottom() {
|
hanlebottom() {
|
||||||
document.getElementById('top').scrollIntoView({ behavior: 'smooth' })
|
document.getElementById("top").scrollIntoView({ behavior: "smooth" });
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* @author: czw (725551805@qq.com)
|
* @author: czw (725551805@qq.com)
|
||||||
@ -170,8 +169,8 @@ export default {
|
|||||||
* @Date: 2022-03-02 09:41:37
|
* @Date: 2022-03-02 09:41:37
|
||||||
*/
|
*/
|
||||||
hanleLogout() {
|
hanleLogout() {
|
||||||
removeToken()
|
removeToken();
|
||||||
this.$router.push({ path: '/logo' })
|
this.$router.push({ path: "/Login" });
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* @author: czw (725551805@qq.com)
|
* @author: czw (725551805@qq.com)
|
||||||
@ -182,7 +181,7 @@ export default {
|
|||||||
*/
|
*/
|
||||||
handlerclick(e) {
|
handlerclick(e) {
|
||||||
if (this.$route.path !== e) {
|
if (this.$route.path !== e) {
|
||||||
this.$router.push({ path: e })
|
this.$router.push({ path: e });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@ -193,7 +192,7 @@ export default {
|
|||||||
* @Date: 2022-03-01 22:25:47
|
* @Date: 2022-03-01 22:25:47
|
||||||
*/
|
*/
|
||||||
add() {
|
add() {
|
||||||
this.show = !this.show
|
this.show = !this.show;
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* @author: czw (725551805@qq.com)
|
* @author: czw (725551805@qq.com)
|
||||||
@ -203,26 +202,26 @@ export default {
|
|||||||
* @Date: 2022-03-01 16:53:49
|
* @Date: 2022-03-01 16:53:49
|
||||||
*/
|
*/
|
||||||
hanblDelete(index, titie) {
|
hanblDelete(index, titie) {
|
||||||
var list = this.levelData[index].name
|
var list = this.levelData[index].name;
|
||||||
|
|
||||||
this.onindex = index
|
this.onindex = index;
|
||||||
this.levelData.splice(this.onindex, 1)
|
this.levelData.splice(this.onindex, 1);
|
||||||
if (titie === this.head) {
|
if (titie === this.head) {
|
||||||
var item
|
var item;
|
||||||
var name
|
var name;
|
||||||
for (let i = 0; i < this.levelData.length; i++) {
|
for (let i = 0; i < this.levelData.length; i++) {
|
||||||
item = this.levelData[i].path
|
item = this.levelData[i].path;
|
||||||
name = this.levelData[i].name
|
name = this.levelData[i].name;
|
||||||
}
|
}
|
||||||
if (this.levelData.length) {
|
if (this.levelData.length) {
|
||||||
if (name !== list) {
|
if (name !== list) {
|
||||||
this.$router.push({ path: item })
|
this.$router.push({ path: item });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.table {
|
.table {
|
||||||
|
|||||||
@ -1,192 +1,189 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
|
<!-- 筛选框 -->
|
||||||
<el-card class="box-card">
|
<el-card class="box-card">
|
||||||
<div class="goods"
|
<div class="goods" style="margin: 20px">
|
||||||
style="margin:20px">
|
<el-form ref="form" :inline="true" :model="form">
|
||||||
<el-form ref="form"
|
|
||||||
:inline="true"
|
|
||||||
:model="form">
|
|
||||||
<el-form-item label="查询类别:">
|
<el-form-item label="查询类别:">
|
||||||
<el-select v-model="form.name1"
|
<el-select v-model="form.targetField" placeholder="全部">
|
||||||
placeholder="全部">
|
<el-option
|
||||||
<el-option v-for="item in options"
|
v-for="item in options"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value">
|
:value="item.value"
|
||||||
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="商品编号">
|
<el-form-item label="操作用户">
|
||||||
<el-input v-model="input"
|
<el-select v-model="form.userId" placeholder="输入操作用户">
|
||||||
placeholder="输入商品编号"></el-input>
|
<el-option
|
||||||
</el-form-item>
|
v-for="item in options1"
|
||||||
<el-form-item label="商品名称">
|
:key="item.id"
|
||||||
<el-input v-model="input"
|
:label="item.name"
|
||||||
placeholder="输入商品名称"></el-input>
|
:value="item.id"
|
||||||
</el-form-item>
|
>
|
||||||
<el-form-item label="商品种类:">
|
|
||||||
<el-select v-model="form.name1"
|
|
||||||
placeholder="输入商品种类">
|
|
||||||
<el-option v-for="item in options"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="商品规格:">
|
|
||||||
<el-select v-model="form.name1"
|
|
||||||
placeholder="输入商品规格">
|
|
||||||
<el-option v-for="item in options"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="商品品牌:">
|
|
||||||
<el-select v-model="form.name1"
|
|
||||||
placeholder="输入商品品牌">
|
|
||||||
<el-option v-for="item in options"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value">
|
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="操作时间:">
|
<el-form-item label="操作时间:">
|
||||||
<el-date-picker v-model="value1"
|
<el-date-picker
|
||||||
|
v-model="value1"
|
||||||
type="datetimerange"
|
type="datetimerange"
|
||||||
range-separator="至"
|
range-separator="-"
|
||||||
start-placeholder="起"
|
start-placeholder="起"
|
||||||
end-placeholder="止"
|
end-placeholder="止"
|
||||||
align="right">
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
>
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary">查询</el-button>
|
<el-button type="primary" @click="query()">查询</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card style="margin-top:30px"
|
|
||||||
class="box-card">
|
<!-- 表格 -->
|
||||||
<div>
|
<el-card style="margin-top: 30px" class="box-card">
|
||||||
<span></span>
|
<el-table :data="tableData" style="width: 100%">
|
||||||
<span>历史记录</span>
|
<el-table-column prop="id" label="序号" width="100"> </el-table-column>
|
||||||
<span>(共800条)</span>
|
<el-table-column prop="created_at" label="时间" width="200">
|
||||||
<span>——玫瑰花</span>
|
|
||||||
</div>
|
|
||||||
<el-table :data="tableData"
|
|
||||||
style="width: 100%">
|
|
||||||
<el-table-column prop="date"
|
|
||||||
label="序号"
|
|
||||||
width="180">
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="name"
|
<el-table-column prop="target_field" label="类别" width="100">
|
||||||
label="时间"
|
|
||||||
width="180">
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="address"
|
<el-table-column prop="before_update" label="操作前"> </el-table-column>
|
||||||
label="类别">
|
<el-table-column prop="after_update" label="操作后"> </el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="user.name" label="操作人" width="100">
|
||||||
<el-table-column prop="address"
|
|
||||||
label="操作前">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="address"
|
|
||||||
label="操作后">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="address"
|
|
||||||
label="操作人">
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-pagination @size-change="handleSizeChange"
|
|
||||||
|
<!-- 分页功能 -->
|
||||||
|
<div class="block">
|
||||||
|
<el-pagination
|
||||||
|
@size-change="handleSizeChange"
|
||||||
@current-change="handleCurrentChange"
|
@current-change="handleCurrentChange"
|
||||||
:current-page="currentPage4"
|
:current-page="current_page"
|
||||||
:page-sizes="[100, 200, 300, 400]"
|
:page-sizes="[15, 50, 100]"
|
||||||
:page-size="100"
|
:page-size="per_page"
|
||||||
layout="total, sizes, prev, pager, next, jumper"
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
:total="400">
|
:total="Paginationdata.total"
|
||||||
|
>
|
||||||
</el-pagination>
|
</el-pagination>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { userList } from "../../api/user";
|
||||||
|
import { recordList } from "../../api/record";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
value: '选项1',
|
value: "cost",
|
||||||
label: '黄金糕',
|
label: "成本",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '选项2',
|
value: "stock",
|
||||||
label: '双皮奶',
|
label: "库存",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '选项3',
|
value: "inventory",
|
||||||
label: '蚵仔煎',
|
label: "库存盘点",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '选项4',
|
value: "status",
|
||||||
label: '龙须面',
|
label: "状态",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '选项5',
|
value: "set",
|
||||||
label: '北京烤鸭',
|
label: "设置",
|
||||||
},
|
},
|
||||||
],
|
], //查询类别
|
||||||
tableData: [
|
options1: [], //查询用户列表
|
||||||
{
|
|
||||||
date: '2016-05-02',
|
|
||||||
name: '王小虎',
|
|
||||||
address: '上海市普陀区金沙江路 1518 弄',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
date: '2016-05-04',
|
|
||||||
name: '王小虎',
|
|
||||||
address: '上海市普陀区金沙江路 1517 弄',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
date: '2016-05-01',
|
|
||||||
name: '王小虎',
|
|
||||||
address: '上海市普陀区金沙江路 1519 弄',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
date: '2016-05-03',
|
|
||||||
name: '王小虎',
|
|
||||||
address: '上海市普陀区金沙江路 1516 弄',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
currentPage4: 4,
|
|
||||||
form: {
|
form: {
|
||||||
name1: '',
|
targetField: "",
|
||||||
name2: '',
|
userId: "",
|
||||||
name3: '',
|
|
||||||
name4: '',
|
|
||||||
name5: '',
|
|
||||||
name6: '',
|
|
||||||
},
|
},
|
||||||
input: '',
|
value1: "", //筛选时间变量
|
||||||
value1: '',
|
tableData: [], //列表数据
|
||||||
}
|
Paginationdata: {}, //分页相关数据
|
||||||
|
current_page: 1, //当前页
|
||||||
|
per_page: 15, //每页显示数量
|
||||||
|
moudule: "goods",
|
||||||
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
//请求列表数据
|
||||||
|
getList() {
|
||||||
|
let queryData = {
|
||||||
|
userId: this.form.userId,
|
||||||
|
targetField: this.form.targetField,
|
||||||
|
moudule: this.moudule,
|
||||||
|
target_id: this.$route.query.id,
|
||||||
|
startTime: this.value1[0],
|
||||||
|
endTime: this.value1[1],
|
||||||
|
page: this.current_page,
|
||||||
|
per_page: this.per_page,
|
||||||
|
};
|
||||||
|
recordList(queryData).then((res) => {
|
||||||
|
console.log(1111, res);
|
||||||
|
this.tableData = res.data.data;
|
||||||
|
this.Paginationdata = res.data.meta;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
//分页功能
|
||||||
handleSizeChange(val) {
|
handleSizeChange(val) {
|
||||||
console.log(`每页 ${val} 条`)
|
//当前条数
|
||||||
|
this.per_page = val;
|
||||||
|
this.getList();
|
||||||
},
|
},
|
||||||
handleCurrentChange(val) {
|
handleCurrentChange(val) {
|
||||||
console.log(`当前页: ${val}`)
|
//当前页
|
||||||
|
this.current_page = val;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
|
||||||
|
// 获取用户列表
|
||||||
|
getUser() {
|
||||||
|
userList().then((res) => {
|
||||||
|
this.options1 = res.data.data;
|
||||||
|
console.log("我是用户", this.options1);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
// 查询
|
||||||
|
query() {
|
||||||
|
console.log(this.form.userId, this.form.targetField);
|
||||||
|
let queryData = {
|
||||||
|
userId: this.form.userId,
|
||||||
|
targetField: this.form.targetField,
|
||||||
|
page: this.current_page,
|
||||||
|
per_page: this.per_page,
|
||||||
|
moudule: this.moudule,
|
||||||
|
target_id: this.$route.query.id,
|
||||||
|
startTime: this.value1[0],
|
||||||
|
endTime: this.value1[1],
|
||||||
|
};
|
||||||
|
recordList(queryData).then((res) => {
|
||||||
|
this.tableData = res.data.data;
|
||||||
|
this.Paginationdata = res.data.meta;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
mounted() {
|
||||||
|
this.getList();
|
||||||
|
this.getUser();
|
||||||
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
.block {
|
||||||
|
margin-top: 30px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -118,15 +118,15 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
//请求列表数据
|
//请求列表数据
|
||||||
getList() {
|
getList() {
|
||||||
|
let token = localStorage.getItem("token");
|
||||||
|
let data = {
|
||||||
|
page: this.current_page,
|
||||||
|
per_page: this.per_page,
|
||||||
|
};
|
||||||
axios
|
axios
|
||||||
.get("/api/logs", {
|
.get("/api/logs", {
|
||||||
headers: {
|
headers: {
|
||||||
Authorization:
|
Authorization: `Bearer ${token}`,
|
||||||
"Bearer w1rr6IsxZIud46dIrGIivNAroFpqN52sSpXhk3azpPq2ZTbUXhgKTOLheoRm",
|
|
||||||
},
|
|
||||||
params: {
|
|
||||||
page: this.current_page,
|
|
||||||
per_page: this.per_page,
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|||||||
@ -11,14 +11,12 @@
|
|||||||
<el-table-column prop="name" label="店铺名称" width="180">
|
<el-table-column prop="name" label="店铺名称" width="180">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="plat_id" label="所属平台"></el-table-column>
|
<el-table-column prop="plat_id" label="所属平台"></el-table-column>
|
||||||
<el-table-column prop="address" label="操作">
|
<el-table-column label="操作">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button type="primary" @click="handEdit(scope.row.id, scope.row)"
|
<el-button type="danger" v-if="scope.row.status === '未授权'"
|
||||||
>编辑</el-button
|
|
||||||
>
|
|
||||||
<el-button type="danger" @click="handdel(scope.row.id)"
|
|
||||||
>授权</el-button
|
>授权</el-button
|
||||||
>
|
>
|
||||||
|
<span v-else>{{ scope.row.status }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -65,8 +63,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { shopListId, shopAdd } from "../../api/shop";
|
import { shopListId, shopAdd, storeList } from "../../api/shop";
|
||||||
import axios from "axios";
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -83,10 +80,6 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// 获取平台
|
|
||||||
shopListId().then((res) => {
|
|
||||||
this.storeId = res.data.data;
|
|
||||||
});
|
|
||||||
// 展示店铺列表
|
// 展示店铺列表
|
||||||
this.getStoreList();
|
this.getStoreList();
|
||||||
},
|
},
|
||||||
@ -96,7 +89,9 @@ export default {
|
|||||||
this.form.name = "";
|
this.form.name = "";
|
||||||
this.form.plat_id = "";
|
this.form.plat_id = "";
|
||||||
this.dialogFormVisible = true;
|
this.dialogFormVisible = true;
|
||||||
|
this.getshop();
|
||||||
},
|
},
|
||||||
|
|
||||||
// 新增商品
|
// 新增商品
|
||||||
addSubmit() {
|
addSubmit() {
|
||||||
const datas = this.form;
|
const datas = this.form;
|
||||||
@ -111,29 +106,19 @@ export default {
|
|||||||
});
|
});
|
||||||
this.dialogFormVisible = false;
|
this.dialogFormVisible = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
// 店铺列表
|
// 店铺列表
|
||||||
getStoreList() {
|
getStoreList() {
|
||||||
// storeList().then((res) => {
|
let page = {
|
||||||
// this.tableData = res.data.data;
|
|
||||||
// console.log(res, "kkk");
|
|
||||||
// });
|
|
||||||
axios
|
|
||||||
.get("/api/shops", {
|
|
||||||
headers: {
|
|
||||||
Authorization:
|
|
||||||
"Bearer w1rr6IsxZIud46dIrGIivNAroFpqN52sSpXhk3azpPq2ZTbUXhgKTOLheoRm",
|
|
||||||
},
|
|
||||||
params: {
|
|
||||||
page: this.current_page,
|
page: this.current_page,
|
||||||
per_page: this.per_page,
|
per_page: this.per_page,
|
||||||
},
|
};
|
||||||
})
|
storeList(page).then((res) => {
|
||||||
.then((res) => {
|
|
||||||
console.log(res);
|
|
||||||
this.tableData = res.data.data;
|
this.tableData = res.data.data;
|
||||||
this.Paginationdata = res.data.meta;
|
this.Paginationdata = res.data.meta;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
//分页功能
|
//分页功能
|
||||||
handleSizeChange(val) {
|
handleSizeChange(val) {
|
||||||
//当前条数
|
//当前条数
|
||||||
@ -147,6 +132,13 @@ export default {
|
|||||||
// console.log(2222, val);
|
// console.log(2222, val);
|
||||||
this.getStoreList();
|
this.getStoreList();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 店铺平台
|
||||||
|
getshop() {
|
||||||
|
shopListId().then((res) => {
|
||||||
|
this.storeId = res.data.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -1,22 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>权限管理(已废弃)</div>
|
||||||
权限管理(废弃)
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'GlxtAuthority',
|
name: "GlxtAuthority",
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {}
|
return {};
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {},
|
mounted() {},
|
||||||
|
|
||||||
methods: {},
|
methods: {},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped></style>
|
||||||
</style>
|
|
||||||
|
|||||||
@ -29,7 +29,11 @@
|
|||||||
<el-table :data="tableList" style="width: 100%">
|
<el-table :data="tableList" style="width: 100%">
|
||||||
<el-table-column prop="id" label="ID"> </el-table-column>
|
<el-table-column prop="id" label="ID"> </el-table-column>
|
||||||
<el-table-column prop="name" label="角色名称"> </el-table-column>
|
<el-table-column prop="name" label="角色名称"> </el-table-column>
|
||||||
<el-table-column prop="name" label="权限内容"> </el-table-column>
|
<el-table-column label="权限内容">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.permissions.join(",") }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="操作">
|
<el-table-column label="操作">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button @click="onEdit(scope.row)">编辑</el-button>
|
<el-button @click="onEdit(scope.row)">编辑</el-button>
|
||||||
@ -60,7 +64,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import axios from "axios";
|
import {
|
||||||
|
roleList,
|
||||||
|
roleAdd,
|
||||||
|
jurisdiction,
|
||||||
|
jurisdictionEdit,
|
||||||
|
} from "../../api/role.js";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -80,33 +89,20 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getroleList();
|
this.getroleList();
|
||||||
this.getJurisdiction();
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//角色表单数据请求
|
//角色表单数据请求
|
||||||
getroleList() {
|
getroleList() {
|
||||||
axios
|
this.getJurisdiction();
|
||||||
.get("/api/roles", {
|
roleList().then((res) => {
|
||||||
headers: {
|
console.log(res);
|
||||||
Authorization:
|
|
||||||
"Bearer w1rr6IsxZIud46dIrGIivNAroFpqN52sSpXhk3azpPq2ZTbUXhgKTOLheoRm",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
.then((res) => {
|
|
||||||
this.tableList = res.data.data;
|
this.tableList = res.data.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
//角色权限请求
|
//角色权限数据请求
|
||||||
getJurisdiction() {
|
getJurisdiction() {
|
||||||
axios
|
jurisdiction().then((res) => {
|
||||||
.get("/api/permissions", {
|
|
||||||
headers: {
|
|
||||||
Authorization:
|
|
||||||
"Bearer w1rr6IsxZIud46dIrGIivNAroFpqN52sSpXhk3azpPq2ZTbUXhgKTOLheoRm",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
.then((res) => {
|
|
||||||
this.Role_Permission = res.data.data;
|
this.Role_Permission = res.data.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -116,14 +112,7 @@ export default {
|
|||||||
let roleName = {
|
let roleName = {
|
||||||
name: this.newrole,
|
name: this.newrole,
|
||||||
};
|
};
|
||||||
axios
|
roleAdd(roleName).then((res) => {
|
||||||
.post("/api/roles", roleName, {
|
|
||||||
headers: {
|
|
||||||
Authorization:
|
|
||||||
"Bearer w1rr6IsxZIud46dIrGIivNAroFpqN52sSpXhk3azpPq2ZTbUXhgKTOLheoRm",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
.then((res) => {
|
|
||||||
this.dialogVisible2 = false;
|
this.dialogVisible2 = false;
|
||||||
this.getroleList();
|
this.getroleList();
|
||||||
if (res.status == 201) {
|
if (res.status == 201) {
|
||||||
@ -138,31 +127,20 @@ export default {
|
|||||||
// 点击编辑
|
// 点击编辑
|
||||||
onEdit(row) {
|
onEdit(row) {
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
// console.log(row.id);
|
|
||||||
this.id = row.id;
|
this.id = row.id;
|
||||||
},
|
},
|
||||||
|
|
||||||
//编辑权限确认
|
//编辑权限确认
|
||||||
getCheckedKeys() {
|
getCheckedKeys() {
|
||||||
let id = this.id; //选中角色的ID
|
let id = this.id; //选中角色的ID
|
||||||
|
|
||||||
this.permissionIds = this.$refs.tree.getCheckedKeys(); //选中权限的ID
|
this.permissionIds = this.$refs.tree.getCheckedKeys(); //选中权限的ID
|
||||||
// console.log(this.permissionIds);
|
|
||||||
this.allpermissionIds = {
|
this.allpermissionIds = {
|
||||||
permissionIds: this.permissionIds,
|
permissionIds: this.permissionIds,
|
||||||
};
|
};
|
||||||
// console.log(this.allpermissionIds);
|
jurisdictionEdit(id, this.allpermissionIds).then((res) => {
|
||||||
|
|
||||||
axios
|
|
||||||
.post(`/api/roles/${id}/permissions`, this.allpermissionIds, {
|
|
||||||
headers: {
|
|
||||||
Authorization:
|
|
||||||
"Bearer w1rr6IsxZIud46dIrGIivNAroFpqN52sSpXhk3azpPq2ZTbUXhgKTOLheoRm",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
.then((res) => {
|
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
this.dialogVisible = false;
|
this.dialogVisible = false;
|
||||||
|
this.getroleList();
|
||||||
this.$message({
|
this.$message({
|
||||||
message: "权限修改成功!",
|
message: "权限修改成功!",
|
||||||
type: "success",
|
type: "success",
|
||||||
|
|||||||
@ -20,7 +20,18 @@
|
|||||||
<el-input v-model="from.password_confirmation"></el-input>
|
<el-input v-model="from.password_confirmation"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="角色">
|
<el-form-item label="角色">
|
||||||
<el-input v-model="from.role_name"></el-input>
|
<!-- <el-input v-model="from.role_name"></el-input> -->
|
||||||
|
<template>
|
||||||
|
<el-select v-model="value" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in roleOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.name"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</template>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div class="from-btn">
|
<div class="from-btn">
|
||||||
<el-button type="danger" @click="dialogVisible = false"
|
<el-button type="danger" @click="dialogVisible = false"
|
||||||
@ -48,7 +59,17 @@
|
|||||||
<el-input v-model="edit_from.email"></el-input>
|
<el-input v-model="edit_from.email"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="角色">
|
<el-form-item label="角色">
|
||||||
<el-input v-model="edit_from.role_name"></el-input>
|
<template>
|
||||||
|
<el-select v-model="edit_from.role_name" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in roleOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.name"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</template>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="密码">
|
<el-form-item label="密码">
|
||||||
<el-input v-model="edit_from.password"></el-input>
|
<el-input v-model="edit_from.password"></el-input>
|
||||||
@ -73,11 +94,15 @@
|
|||||||
<el-table :data="tableList" style="width: 100%">
|
<el-table :data="tableList" style="width: 100%">
|
||||||
<el-table-column prop="id" label="ID"></el-table-column>
|
<el-table-column prop="id" label="ID"></el-table-column>
|
||||||
<el-table-column prop="name" label="姓名"></el-table-column>
|
<el-table-column prop="name" label="姓名"></el-table-column>
|
||||||
<el-table-column label="角色"> 超级管理员</el-table-column>
|
<el-table-column label="角色">
|
||||||
|
<template slot-scope="scope">{{
|
||||||
|
scope.row.roles[0].name
|
||||||
|
}}</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="操作">
|
<el-table-column label="操作">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button @click="openEdit(scope.row)">编辑</el-button>
|
<el-button @click="openEdit(scope.row)">编辑</el-button>
|
||||||
<el-button type="danger">删除</el-button>
|
<!-- <el-button type="danger">删除</el-button> -->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -101,7 +126,13 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import axios from "axios";
|
import {
|
||||||
|
userList,
|
||||||
|
userAdd,
|
||||||
|
userEdit,
|
||||||
|
userConfirm,
|
||||||
|
roleList,
|
||||||
|
} from "../../api/user";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -130,42 +161,41 @@ export default {
|
|||||||
Paginationdata: {}, //分页相关数据
|
Paginationdata: {}, //分页相关数据
|
||||||
current_page: 1, //当前页
|
current_page: 1, //当前页
|
||||||
per_page: 15, //每页显示数量
|
per_page: 15, //每页显示数量
|
||||||
|
roleOptions: [], //角色下拉框
|
||||||
|
value: "", //角色下拉框选择
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getList(); //进入调用用户表单数据请求
|
this.getList(); //进入调用用户表单数据请求
|
||||||
|
this.getrole(); //进入调用角色数据请求
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 角色列表请求
|
||||||
|
getrole() {
|
||||||
|
roleList().then((res) => {
|
||||||
|
this.roleOptions = res.data.data;
|
||||||
|
console.log(this.roleOptions);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
//用户表单数据请求
|
//用户表单数据请求
|
||||||
getList() {
|
getList() {
|
||||||
axios
|
let page = {
|
||||||
.get("api/users", {
|
|
||||||
headers: {
|
|
||||||
Authorization:
|
|
||||||
"Bearer w1rr6IsxZIud46dIrGIivNAroFpqN52sSpXhk3azpPq2ZTbUXhgKTOLheoRm",
|
|
||||||
},
|
|
||||||
params: {
|
|
||||||
page: this.current_page,
|
page: this.current_page,
|
||||||
per_page: this.per_page,
|
per_page: this.per_page,
|
||||||
},
|
};
|
||||||
})
|
userList(page).then((res) => {
|
||||||
.then((res) => {
|
|
||||||
this.tableList = res.data.data;
|
this.tableList = res.data.data;
|
||||||
this.Paginationdata = res.data.meta;
|
this.Paginationdata = res.data.meta;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
//点击新增确认
|
//点击新增确认
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
// 请求
|
this.from.role_name = this.value;
|
||||||
axios
|
let from = this.from;
|
||||||
.post("/api/users", this.from, {
|
userAdd(from).then((res) => {
|
||||||
headers: {
|
|
||||||
Authorization:
|
|
||||||
"Bearer w1rr6IsxZIud46dIrGIivNAroFpqN52sSpXhk3azpPq2ZTbUXhgKTOLheoRm",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
.then((res) => {
|
|
||||||
this.tableList = [...this.tableList, res.data.data];
|
this.tableList = [...this.tableList, res.data.data];
|
||||||
this.dialogVisible = false;
|
this.dialogVisible = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
@ -176,36 +206,22 @@ export default {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
//点击编辑
|
//点击编辑
|
||||||
openEdit(e) {
|
openEdit(e) {
|
||||||
this.editVisible = true;
|
this.editVisible = true;
|
||||||
// console.log(e.id);
|
|
||||||
let id = e.id;
|
let id = e.id;
|
||||||
this.id = e.id;
|
this.id = e.id;
|
||||||
// 请求id对应数据
|
// 请求id对应数据
|
||||||
axios
|
userEdit(id).then((res) => {
|
||||||
.get(`/api/users/${id}`, {
|
|
||||||
headers: {
|
|
||||||
Authorization:
|
|
||||||
"Bearer w1rr6IsxZIud46dIrGIivNAroFpqN52sSpXhk3azpPq2ZTbUXhgKTOLheoRm",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
.then((res) => {
|
|
||||||
this.edit_from = res.data.data;
|
this.edit_from = res.data.data;
|
||||||
|
console.log(this.edit_from);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
//编辑完确认请求
|
//编辑完确认请求
|
||||||
onEdit() {
|
onEdit() {
|
||||||
let id = this.id;
|
userConfirm(this.id, this.edit_from).then((res) => {
|
||||||
console.log(id);
|
|
||||||
axios
|
|
||||||
.patch(`/api/users/${id}`, this.edit_from, {
|
|
||||||
headers: {
|
|
||||||
Authorization:
|
|
||||||
"Bearer w1rr6IsxZIud46dIrGIivNAroFpqN52sSpXhk3azpPq2ZTbUXhgKTOLheoRm",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
.then((res) => {
|
|
||||||
this.tableList = [...this.tableList, res.data.data];
|
this.tableList = [...this.tableList, res.data.data];
|
||||||
this.editVisible = false;
|
this.editVisible = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
@ -216,17 +232,16 @@ export default {
|
|||||||
});
|
});
|
||||||
this.editVisible = false;
|
this.editVisible = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
//分页功能
|
//分页功能
|
||||||
handleSizeChange(val) {
|
handleSizeChange(val) {
|
||||||
//当前条数
|
//当前条数
|
||||||
this.per_page = val;
|
this.per_page = val;
|
||||||
// console.log(1111, val);
|
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
handleCurrentChange(val) {
|
handleCurrentChange(val) {
|
||||||
//当前页
|
//当前页
|
||||||
this.current_page = val;
|
this.current_page = val;
|
||||||
// console.log(2222, val);
|
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@ -40,7 +40,97 @@
|
|||||||
class="el-icon-plus avatar-uploader-icon"></i>
|
class="el-icon-plus avatar-uploader-icon"></i>
|
||||||
</el-upload> -->
|
</el-upload> -->
|
||||||
</div>
|
</div>
|
||||||
<el-form ref="form" :inline="true" :model="form">
|
<!-- 编辑按钮进入显示 -->
|
||||||
|
<el-form ref="form" :inline="true" :model="form" v-if="goodsData != ''">
|
||||||
|
<div>
|
||||||
|
<el-form-item label="商品名称:">
|
||||||
|
<el-input
|
||||||
|
placeholder="商品名称"
|
||||||
|
v-model="goodsData.goods.title"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="商品编码:">
|
||||||
|
<el-input
|
||||||
|
placeholder="商品编码"
|
||||||
|
v-model="goodsData.goods.goods_code"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="商品种类:">
|
||||||
|
<el-select
|
||||||
|
v-model="goodsData.goods.type_id"
|
||||||
|
placeholder="商品种类"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in cate"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="商品品牌:">
|
||||||
|
<el-select
|
||||||
|
v-model="goodsData.goods.brand_id"
|
||||||
|
placeholder="商品品牌"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in brand"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<!-- <span style="margin-right: -15px">{{ i + 1 }}.</span> -->
|
||||||
|
<el-form-item label="商品规格:">
|
||||||
|
<el-input
|
||||||
|
placeholder="商品规格"
|
||||||
|
v-model="goodsData.title"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="规格编码:">
|
||||||
|
<el-input v-model="goodsData.sku_code" placeholder="商品编码">
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="商品状态:">
|
||||||
|
<el-select
|
||||||
|
v-model="goodsData.goods.reserve"
|
||||||
|
placeholder="下架(默认)"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in options"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<div>
|
||||||
|
<el-form-item label="商品数量:">
|
||||||
|
<el-input v-model="goodsData.num" placeholder="商品数量">
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="商品成本:">
|
||||||
|
<el-input v-model="goodsData.cost" placeholder="商品成本">
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="btn">
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="Edititem()">保存</el-button>
|
||||||
|
<el-button plain @click="cancel()">取消</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<!-- 新建商品进入显示 -->
|
||||||
|
<el-form ref="form" :inline="true" :model="form" v-if="goodsData == ''">
|
||||||
<div>
|
<div>
|
||||||
<el-form-item label="商品名称:">
|
<el-form-item label="商品名称:">
|
||||||
<el-input placeholder="商品名称" v-model="form.title"></el-input>
|
<el-input placeholder="商品名称" v-model="form.title"></el-input>
|
||||||
@ -82,7 +172,7 @@
|
|||||||
v-model="skus[i].title"
|
v-model="skus[i].title"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<span class="addto" v-if="!gid" @click="handleAdd()">+</span>
|
<span class="addto" @click="handleAdd()">+</span>
|
||||||
<el-form-item label="规格编码:">
|
<el-form-item label="规格编码:">
|
||||||
<el-input v-model="skus[i].sku_code" placeholder="商品编码">
|
<el-input v-model="skus[i].sku_code" placeholder="商品编码">
|
||||||
</el-input>
|
</el-input>
|
||||||
@ -115,7 +205,7 @@
|
|||||||
<div class="btn">
|
<div class="btn">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="handleSave()">保存</el-button>
|
<el-button type="primary" @click="handleSave()">保存</el-button>
|
||||||
<el-button plain>取消</el-button>
|
<el-button plain @click="cancel()">取消</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
@ -147,12 +237,14 @@ export default {
|
|||||||
brand: [], // 品牌列表
|
brand: [], // 品牌列表
|
||||||
cate: [], // 种类列表
|
cate: [], // 种类列表
|
||||||
goodschoose: [], // 商品列表
|
goodschoose: [], // 商品列表
|
||||||
|
goodsID: "", //进入页面是否有商品id
|
||||||
|
goodsData: [], //编辑按钮进入获取的商品数据
|
||||||
// 规格列表
|
// 规格列表
|
||||||
skus: [
|
skus: [
|
||||||
{
|
{
|
||||||
title: "",
|
title: "",
|
||||||
sku_code: "",
|
sku_code: "",
|
||||||
status: "",
|
status: "0",
|
||||||
num: "",
|
num: "",
|
||||||
cost: "",
|
cost: "",
|
||||||
},
|
},
|
||||||
@ -162,13 +254,18 @@ export default {
|
|||||||
form: {
|
form: {
|
||||||
goods_id: "",
|
goods_id: "",
|
||||||
title: "",
|
title: "",
|
||||||
img_url: "https://cn.vuejs.org/images/logo.svg",
|
img_url:
|
||||||
|
"https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-dc-site/c40319b0-6080-11eb-918d-3d24828c498c.png",
|
||||||
type_id: "",
|
type_id: "",
|
||||||
brand_id: "",
|
brand_id: "",
|
||||||
goods_code: "",
|
goods_code: "",
|
||||||
},
|
},
|
||||||
// 商品状态
|
// 商品状态
|
||||||
options: [
|
options: [
|
||||||
|
{
|
||||||
|
id: "0",
|
||||||
|
label: "下架",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: "1",
|
id: "1",
|
||||||
label: "在售",
|
label: "在售",
|
||||||
@ -177,10 +274,6 @@ export default {
|
|||||||
id: "2",
|
id: "2",
|
||||||
label: "预警",
|
label: "预警",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
id: "0",
|
|
||||||
label: "下架",
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
file: [],
|
file: [],
|
||||||
};
|
};
|
||||||
@ -221,32 +314,35 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 商品列表
|
// 商品列表
|
||||||
handleList() {
|
handleList() {
|
||||||
goodsList().then((res) => {
|
goodsList().then((res) => {
|
||||||
this.goodschoose = res.data.data;
|
this.goodschoose = res.data.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 保存,增加一个商品
|
|
||||||
|
// 添加商品
|
||||||
handleSave() {
|
handleSave() {
|
||||||
const goods = this.form;
|
const goods = this.form;
|
||||||
const sku2 = this.skus[0];
|
// const sku2 = this.skus[0];
|
||||||
const skus = [];
|
// const skus = [];
|
||||||
skus.push(sku2);
|
// skus.push(sku2);
|
||||||
// console.log(goods, skus);
|
// console.log(goods, skus);
|
||||||
|
|
||||||
|
const skus = this.skus;
|
||||||
|
|
||||||
const updata = {
|
const updata = {
|
||||||
...goods,
|
...goods,
|
||||||
goods_id: this.lid,
|
goods_id: this.lid,
|
||||||
skus: skus,
|
skus: skus,
|
||||||
};
|
};
|
||||||
// console.log(updata);
|
// console.log(updata);
|
||||||
|
let token = localStorage.getItem("token");
|
||||||
axios
|
axios
|
||||||
.post("/api/goods", updata, {
|
.post("/api/goods", updata, {
|
||||||
headers: {
|
headers: {
|
||||||
Authorization:
|
Authorization: `Bearer ${token}`,
|
||||||
"Bearer w1rr6IsxZIud46dIrGIivNAroFpqN52sSpXhk3azpPq2ZTbUXhgKTOLheoRm",
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
@ -256,6 +352,7 @@ export default {
|
|||||||
type: "success",
|
type: "success",
|
||||||
});
|
});
|
||||||
this.updateForm();
|
this.updateForm();
|
||||||
|
this.$router.push("GOODS_LIST");
|
||||||
} else {
|
} else {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: "商品添加失败!",
|
message: "商品添加失败!",
|
||||||
@ -263,41 +360,6 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// if (this.gid) {
|
|
||||||
// const goods = this.form;
|
|
||||||
// const sku = this.skus[0];
|
|
||||||
// const updata = {
|
|
||||||
// ...goods,
|
|
||||||
// ...sku,
|
|
||||||
// goods_id: this.lid,
|
|
||||||
// };
|
|
||||||
// console.log(updata);
|
|
||||||
// } else {
|
|
||||||
// console.log(1111);
|
|
||||||
// const datas = {
|
|
||||||
// ...this.form,
|
|
||||||
// skus: this.skus,
|
|
||||||
// };
|
|
||||||
|
|
||||||
// addGoods(datas)
|
|
||||||
// .then((res) => {
|
|
||||||
// console.log("请求发起");
|
|
||||||
// if (res.data.httpCode == 200) {
|
|
||||||
// this.$message({
|
|
||||||
// type: "success",
|
|
||||||
// message: "添加成功",
|
|
||||||
// });
|
|
||||||
// this.updateForm();
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// .catch((e) => {
|
|
||||||
// this.$message({
|
|
||||||
// type: "error",
|
|
||||||
// message: e.response.data.errorMessage.goods_code[0],
|
|
||||||
// });
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 修改成功后重置表单
|
// 修改成功后重置表单
|
||||||
@ -319,6 +381,7 @@ export default {
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
|
|
||||||
// 增加一个商品规格
|
// 增加一个商品规格
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.skus.push({
|
this.skus.push({
|
||||||
@ -328,23 +391,100 @@ export default {
|
|||||||
num: "",
|
num: "",
|
||||||
cost: "",
|
cost: "",
|
||||||
});
|
});
|
||||||
|
console.log(this.skus);
|
||||||
},
|
},
|
||||||
|
|
||||||
// 删除一个商品规格
|
// 删除一个商品规格
|
||||||
handleDelete(index) {
|
handleDelete(index) {
|
||||||
this.skus.splice(index, 1);
|
this.skus.splice(index, 1);
|
||||||
},
|
},
|
||||||
|
|
||||||
hanleurlimg(val) {
|
hanleurlimg(val) {
|
||||||
console.log(val, "=+++++++++");
|
console.log(val, "=+++++++++");
|
||||||
},
|
},
|
||||||
|
|
||||||
// 上传商品图片
|
// 上传商品图片
|
||||||
successUpload(file, fileList) {
|
successUpload(file, fileList) {
|
||||||
console.log(file, fileList, 5555);
|
console.log(file, fileList, 5555);
|
||||||
},
|
},
|
||||||
|
|
||||||
errorUpload(file, fileList) {
|
errorUpload(file, fileList) {
|
||||||
console.log(file, fileList, 5555);
|
console.log(file, fileList, 5555);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 商品列表页进入带数据表单
|
||||||
|
getgoodsidData() {
|
||||||
|
let id = this.bigID;
|
||||||
|
let token = localStorage.getItem("token");
|
||||||
|
axios
|
||||||
|
.get(`/api/goods_skus/${id}`, {
|
||||||
|
headers: {
|
||||||
|
Authorization: `Bearer ${token}`,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
this.goodsData = res.data.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
// 移除商品图片
|
// 移除商品图片
|
||||||
removeUpload() {},
|
removeUpload() {},
|
||||||
|
|
||||||
|
// 编辑确认请求
|
||||||
|
Edititem() {
|
||||||
|
let id = this.bigID;
|
||||||
|
console.log("ID", id);
|
||||||
|
console.log("goodsid", this.goodsData.goods_id);
|
||||||
|
let goods = {
|
||||||
|
title: this.goodsData.goods.title,
|
||||||
|
img_url: this.goodsData.goods.img_url,
|
||||||
|
type_id: this.goodsData.goods.type_id,
|
||||||
|
brand_id: this.goodsData.goods.brand_id,
|
||||||
|
goods_code: this.goodsData.goods.goods_code,
|
||||||
|
};
|
||||||
|
let sku = {
|
||||||
|
title: this.goodsData.title,
|
||||||
|
sku_code: this.goodsData.sku_code,
|
||||||
|
status: this.goodsData.status,
|
||||||
|
num: this.goodsData.num,
|
||||||
|
cost: this.goodsData.cost,
|
||||||
|
};
|
||||||
|
if (sku.status == "下架") {
|
||||||
|
sku.status = 0;
|
||||||
|
} else if (sku.status == "在售") {
|
||||||
|
sku.status = 1;
|
||||||
|
} else if (sku.status == "预警") {
|
||||||
|
sku.status = 2;
|
||||||
|
}
|
||||||
|
let data = {
|
||||||
|
goods_id: this.goodsData.goods_id,
|
||||||
|
goods,
|
||||||
|
sku,
|
||||||
|
};
|
||||||
|
console.log(data);
|
||||||
|
let token = localStorage.getItem("token");
|
||||||
|
axios
|
||||||
|
.patch(`/api/goods_skus/${id}`, data, {
|
||||||
|
headers: {
|
||||||
|
Authorization: `Bearer ${token}`,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.$router.push("/GOODS_LIST");
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.goodsID = sessionStorage.getItem("商品ID");
|
||||||
|
this.bigID = sessionStorage.getItem("ID");
|
||||||
|
// console.log("商品ID", this.goodsID);
|
||||||
|
// console.log("ID", this.bigID);
|
||||||
|
this.getgoodsidData();
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.gid = this.$route.query;
|
this.gid = this.$route.query;
|
||||||
@ -359,6 +499,10 @@ export default {
|
|||||||
this.handleList();
|
this.handleList();
|
||||||
this.handleUpdate();
|
this.handleUpdate();
|
||||||
},
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
sessionStorage.removeItem("商品ID"); //销毁内存中的商品ID
|
||||||
|
sessionStorage.removeItem("ID"); //销毁内存中的ID
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -372,13 +516,15 @@ export default {
|
|||||||
}
|
}
|
||||||
.addto {
|
.addto {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 28px;
|
width: 30px;
|
||||||
height: 28px;
|
height: 30px;
|
||||||
background-color: blue;
|
background-color: blue;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 25px;
|
font-size: 25px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 28px;
|
line-height: 30px;
|
||||||
|
border-radius: 5px;
|
||||||
|
margin-top: 4px;
|
||||||
}
|
}
|
||||||
/* .btn {
|
/* .btn {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user