feat: #10000 暂存

This commit is contained in:
赵世界 2022-09-01 18:49:41 +08:00
parent 83afb5dcd0
commit cd6ec5d6a6
14 changed files with 2160 additions and 2279 deletions

View File

@ -7,9 +7,10 @@
</div> </div>
</template> </template>
<script> <script>
export default { export default {
}; };
</script> </script>
<style lang="scss"></style> <style lang="scss">
</style>

View File

@ -19,7 +19,7 @@ const list = [
{ {
path: "GOODS_TYPE", path: "GOODS_TYPE",
name: "商品种类", name: "商品种类",
component: () => import("../views/home/home.vue"), component: () => import("../views/goodsType/goodsType.vue"),
}, },
{ {
path: "GOODS_BRAND", path: "GOODS_BRAND",

View File

@ -18,8 +18,8 @@
</template> </template>
<script> <script>
import axios from "axios"; import axios from "axios";
export default { export default {
data() { data() {
return { return {
checked: false, // checked: false, //
@ -104,20 +104,20 @@
this.setCookie("", "", false, -1); this.setCookie("", "", false, -1);
}, },
}, },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.backimg { .backimg {
width: 100%; width: 100%;
height: 1080px; height: 1080px;
background-image: url("./../css/img/组 32.png"); background-image: url("./../css/img/组 32.png");
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100%; background-size: 100%;
position: relative; position: relative;
} }
.sign { .sign {
width: 400px; width: 400px;
height: 500px; height: 500px;
position: absolute; position: absolute;
@ -187,5 +187,5 @@
.el-checkbox { .el-checkbox {
color: rgba(43, 83, 236); color: rgba(43, 83, 236);
} }
} }
</style> </style>

View File

@ -1,14 +1,12 @@
<template> <template>
<div class="conent"> <div class="conent">
<!-- 新增按钮 --> <!-- 新增按钮 -->
<div class="btn">
<el-button type="primary" @click="handAdd">新增</el-button> <el-button type="primary" @click="handAdd">新增</el-button>
</div>
<!-- 列表 --> <!-- 列表 -->
<div class="table"> <div class="table">
<el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%" <el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%"
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55"> </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="" label="操作"> <el-table-column prop="" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
@ -19,6 +17,14 @@
</el-table> </el-table>
</div> </div>
<!-- 分页功能 -->
<div class="block">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:current-page="current_page" :page-sizes="[15, 50, 100]" :page-size="per_page"
layout="total, sizes, prev, pager, next, jumper" :total="Paginationdata.total">
</el-pagination>
</div>
<!-- 新增品牌对话框 --> <!-- 新增品牌对话框 -->
<el-dialog title="新增品牌" :visible.sync="dialogFormVisible" :close-on-click-modal="false"> <el-dialog title="新增品牌" :visible.sync="dialogFormVisible" :close-on-click-modal="false">
<el-form :model="form"> <el-form :model="form">
@ -44,25 +50,17 @@
<el-button type="primary" @click="EditSubmit"> </el-button> <el-button type="primary" @click="EditSubmit"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<!-- 分页功能 -->
<div class="block">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="current_page"
:page-sizes="[15, 50, 100]" :page-size="per_page" layout="total, sizes, prev, pager, next, jumper"
:total="Paginationdata.total">
</el-pagination>
</div>
</div> </div>
</template> </template>
<script> <script>
import { import {
Brand_goods_types, Brand_goods_types,
DelBrand_goods_types, DelBrand_goods_types,
AddBrandgoods_types, AddBrandgoods_types,
editBrand_types, editBrand_types,
} from "../../api/rankingData"; } from "../../api/rankingData";
export default { export default {
data() { data() {
return { return {
id: "", //id id: "", //id
@ -177,35 +175,11 @@
}); });
}, },
}, },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.conent { .block {
width: 100%;
min-height: calc(100vh - 200px);
position: relative;
}
.btn {
height: 104px;
border-radius: 5px;
display: flex;
align-items: center;
}
.el-button {
width: 114px;
height: 44px;
border-radius: 3px;
}
.table {
margin-top: 20px;
}
.block {
margin-top: 30px; margin-top: 30px;
} }
</style> </style>

View File

@ -11,8 +11,8 @@
</el-select> </el-select>
</div> </div>
<span style="font-size: 14px">商品图片 <span style="font-size: 14px">商品图片
<el-upload class="avatar-uploader" action="#" :limit="1" :auto-upload="false" :show-file-list="true" <el-upload class="avatar-uploader" action="#" :limit="1" :auto-upload="false"
list-type="picture-card" :on-change="handleAvatarSuccess"> :show-file-list="true" list-type="picture-card" :on-change="handleAvatarSuccess">
<img v-if="imageUrl" :src="imageUrl" class="avatar" /> <img v-if="imageUrl" :src="imageUrl" class="avatar" />
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> </el-upload>
@ -82,7 +82,8 @@
<el-input placeholder="商品名称" v-model="form.title" v-else></el-input> <el-input placeholder="商品名称" v-model="form.title" v-else></el-input>
</el-form-item> </el-form-item>
<el-form-item label="商品编码:"> <el-form-item label="商品编码:">
<el-input placeholder="商品编码" v-model="form.goods_code" :disabled="true" v-if="isShow"></el-input> <el-input placeholder="商品编码" v-model="form.goods_code" :disabled="true" v-if="isShow">
</el-input>
<el-input placeholder="商品编码" v-model="form.goods_code" v-else></el-input> <el-input placeholder="商品编码" v-model="form.goods_code" v-else></el-input>
</el-form-item> </el-form-item>
<el-form-item label="商品种类:"> <el-form-item label="商品种类:">
@ -139,15 +140,15 @@
</template> </template>
<script> <script>
import { import {
addGoods, addGoods,
checkGoods, checkGoods,
goodsList, goodsList,
updateGoods, updateGoods,
imgUpload, imgUpload,
} from "../../../api/goods.js"; } from "../../../api/goods.js";
import { goods_types, Brand_goods_types } from "../../../api/rankingData.js"; import { goods_types, Brand_goods_types } from "../../../api/rankingData.js";
export default { export default {
data() { data() {
return { return {
imgs: [], imgs: [],
@ -416,20 +417,20 @@
sessionStorage.removeItem("商品ID"); //ID sessionStorage.removeItem("商品ID"); //ID
sessionStorage.removeItem("ID"); //ID sessionStorage.removeItem("ID"); //ID
}, },
}; };
</script> </script>
<style scoped> <style scoped>
.el-upload--picture-card { .el-upload--picture-card {
width: 50px; width: 50px;
height: 50px; height: 50px;
} }
.el-form-item { .el-form-item {
margin-left: 60px; margin-left: 60px;
} }
.addto { .addto {
display: inline-block; display: inline-block;
width: 30px; width: 30px;
height: 30px; height: 30px;
@ -440,33 +441,33 @@
line-height: 30px; line-height: 30px;
border-radius: 5px; border-radius: 5px;
margin-top: 4px; margin-top: 4px;
} }
/* 分割 */ /* 分割 */
.avatar-uploader .el-upload { .avatar-uploader .el-upload {
border: 1px dashed #d9d9d9; border: 1px dashed #d9d9d9;
border-radius: 6px; border-radius: 6px;
cursor: pointer; cursor: pointer;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
} }
.avatar-uploader .el-upload:hover { .avatar-uploader .el-upload:hover {
border-color: #409eff; border-color: #409eff;
} }
.avatar-uploader-icon { .avatar-uploader-icon {
font-size: 28px; font-size: 28px;
color: #8c939d; color: #8c939d;
width: 148px; width: 148px;
height: 148px; height: 148px;
line-height: 148px; line-height: 148px;
text-align: center; text-align: center;
} }
.avatar { .avatar {
width: 148px; width: 148px;
height: 148px; height: 148px;
display: block; display: block;
} }
</style> </style>

View File

@ -360,11 +360,7 @@
<script> <script>
import axios from "axios"; import axios from "axios";
import { goods_types, Brand_goods_types } from "../../api/rankingData.js"; import { goods_types, Brand_goods_types } from "../../api/rankingData.js";
import { import { goods, update, singleUpdate } from "../../api/goods";
goods,
update,
singleUpdate,
} from "../../api/goods";
export default { export default {
data() { data() {
return { return {

View File

@ -0,0 +1,186 @@
<template>
<div class="conent">
<!-- 新增按钮 -->
<el-button type="primary" @click="handAdd">新增</el-button>
<!-- 列表 -->
<div class="table">
<el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%"
@selection-change="handleSelectionChange">
<el-table-column prop="name" label="商品种类"> </el-table-column>
<el-table-column prop="" label="操作">
<template slot-scope="scope">
<el-button type="primary" @click="handEdit(scope.row.id, scope.row)">编辑</el-button>
<el-button type="danger" @click="handdel(scope.row.id)">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
<!-- 分页功能 -->
<div class="block">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:current-page="current_page" :page-sizes="[15, 50, 100]" :page-size="per_page"
layout="total, sizes, prev, pager, next, jumper" :total="Paginationdata.total">
</el-pagination>
</div>
<!-- 新增种类对话框 -->
<el-dialog title="新增" :visible.sync="dialogFormVisible" :close-on-click-modal="false">
<el-form :model="form">
<el-form-item label="商品种类" :label-width="formLabelWidth">
<el-input v-model="form.kindName" autocomplete="off"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false"> </el-button>
<el-button type="primary" @click="addSubmit"> </el-button>
</div>
</el-dialog>
<!-- 编辑 -->
<el-dialog title="编辑" :visible.sync="dialogFormVisible1" :close-on-click-modal="false">
<el-form :model="form1">
<el-form-item label="编辑种类" :label-width="formLabelWidth1">
<el-input v-model="form1.kindName1" autocomplete="off"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible1 = false"> </el-button>
<el-button type="primary" @click="EditSubmit"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
goods_types,
Delgoods_types,
Addgoods_types,
editGoods_types,
} from "../../api/rankingData";
export default {
data() {
return {
id: "", //id
tableData: [],
multipleSelection: [],
dialogFormVisible: false,
dialogFormVisible1: false,
form: {
kindName: "", //
},
form1: {
kindName1: "", //
},
formLabelWidth: "120px",
formLabelWidth1: "120px",
newKind: [],
Paginationdata: {}, //
current_page: 1, //
per_page: 15, //
};
},
mounted() {
this.getGoods_types();
},
methods: {
//
handleSelectionChange(val) {
this.multipleSelection = val;
},
//
handleSizeChange(val) {
//
this.per_page = val;
this.getGoods_types();
},
handleCurrentChange(val) {
//
this.current_page = val;
this.getGoods_types();
},
//
handAdd() {
this.form.kindName = "";
this.dialogFormVisible = true;
},
//
addSubmit() {
var string;
string = this.form.kindName.replace(/\s/g, ",").split(",");
Addgoods_types({
names: string,
}).then((res) => {
this.$message({
type: "success",
message: "添加成功",
});
this.getGoods_types();
});
this.dialogFormVisible = false;
},
//
handEdit(id, item) {
this.id = id;
this.form1.kindName1 = item.name;
this.dialogFormVisible1 = true;
},
//
EditSubmit() {
editGoods_types(this.id, {
name: this.form1.kindName1,
}).then((res) => {
this.$message({
type: "success",
message: "编辑成功",
});
this.getGoods_types();
});
this.dialogFormVisible1 = false;
},
//
handdel(id) {
this.$confirm("确定删除此条商品种类吗?", "确认删除", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
Delgoods_types(id).then((res) => {
this.getGoods_types();
});
this.$message({
type: "success",
message: "删除成功!",
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
},
//
getGoods_types() {
let page = {
page: this.current_page,
per_page: this.per_page,
};
goods_types(page).then((res) => {
this.tableData = res.data.data;
this.Paginationdata = res.data.meta;
});
},
},
};
</script>
<style lang="scss" scoped>
.block {
margin-top: 30px;
}
</style>

View File

@ -1,212 +0,0 @@
<template>
<div class="conent">
<!-- 新增按钮 -->
<div class="btn">
<el-button type="primary" @click="handAdd">新增</el-button>
</div>
<!-- 列表 -->
<div class="table">
<el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%"
@selection-change="handleSelectionChange">
<el-table-column type="selection" width="55"> </el-table-column>
<el-table-column prop="name" label="商品种类"> </el-table-column>
<el-table-column prop="" label="操作">
<template slot-scope="scope">
<el-button type="primary" @click="handEdit(scope.row.id, scope.row)">编辑</el-button>
<el-button type="danger" @click="handdel(scope.row.id)">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
<!-- 新增种类对话框 -->
<el-dialog title="新增" :visible.sync="dialogFormVisible" :close-on-click-modal="false">
<el-form :model="form">
<el-form-item label="商品种类" :label-width="formLabelWidth">
<el-input v-model="form.kindName" autocomplete="off"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false"> </el-button>
<el-button type="primary" @click="addSubmit"> </el-button>
</div>
</el-dialog>
<!-- 编辑 -->
<el-dialog title="编辑" :visible.sync="dialogFormVisible1" :close-on-click-modal="false">
<el-form :model="form1">
<el-form-item label="编辑种类" :label-width="formLabelWidth1">
<el-input v-model="form1.kindName1" autocomplete="off"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible1 = false"> </el-button>
<el-button type="primary" @click="EditSubmit"> </el-button>
</div>
</el-dialog>
<!-- 分页功能 -->
<div class="block">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="current_page"
:page-sizes="[15, 50, 100]" :page-size="per_page" layout="total, sizes, prev, pager, next, jumper"
:total="Paginationdata.total">
</el-pagination>
</div>
</div>
</template>
<script>
import {
goods_types,
Delgoods_types,
Addgoods_types,
editGoods_types,
} from "../../api/rankingData";
export default {
data() {
return {
id: "", //id
tableData: [],
multipleSelection: [],
dialogFormVisible: false,
dialogFormVisible1: false,
form: {
kindName: "", //
},
form1: {
kindName1: "", //
},
formLabelWidth: "120px",
formLabelWidth1: "120px",
newKind: [],
Paginationdata: {}, //
current_page: 1, //
per_page: 15, //
};
},
mounted() {
this.getGoods_types();
},
methods: {
//
handleSelectionChange(val) {
this.multipleSelection = val;
},
//
handleSizeChange(val) {
//
this.per_page = val;
this.getGoods_types();
},
handleCurrentChange(val) {
//
this.current_page = val;
this.getGoods_types();
},
//
handAdd() {
this.form.kindName = "";
this.dialogFormVisible = true;
},
//
addSubmit() {
var string;
string = this.form.kindName.replace(/\s/g, ",").split(",");
Addgoods_types({
names: string,
}).then((res) => {
this.$message({
type: "success",
message: "添加成功",
});
this.getGoods_types();
});
this.dialogFormVisible = false;
},
//
handEdit(id, item) {
this.id = id;
this.form1.kindName1 = item.name;
this.dialogFormVisible1 = true;
},
//
EditSubmit() {
editGoods_types(this.id, {
name: this.form1.kindName1,
}).then((res) => {
this.$message({
type: "success",
message: "编辑成功",
});
this.getGoods_types();
});
this.dialogFormVisible1 = false;
},
//
handdel(id) {
this.$confirm("确定删除此条商品种类吗?", "确认删除", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
Delgoods_types(id).then((res) => {
this.getGoods_types();
});
this.$message({
type: "success",
message: "删除成功!",
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
},
//
getGoods_types() {
let page = {
page: this.current_page,
per_page: this.per_page,
};
goods_types(page).then((res) => {
this.tableData = res.data.data;
this.Paginationdata = res.data.meta;
});
},
},
};
</script>
<style lang="scss" scoped>
.conent {
width: 100%;
min-height: calc(100vh - 200px);
position: relative;
}
.btn {
height: 104px;
border-radius: 5px;
display: flex;
align-items: center;
}
.el-button {
width: 114px;
height: 44px;
border-radius: 3px;
}
.table {
margin-top: 20px;
}
.block {
margin-top: 30px;
}
</style>

View File

@ -13,7 +13,9 @@
<template slot="title"> <template slot="title">
<span>{{ item.name }}</span> <span>{{ item.name }}</span>
</template> </template>
<el-menu-item :index="items.code" :key="items.id" v-for="items in item.children">{{ items.name }} <el-menu-item :index="items.code" :key="items.id" v-for="items in item.children">{{
items.name
}}
</el-menu-item> </el-menu-item>
</el-submenu> </el-submenu>
</div> </div>
@ -30,7 +32,8 @@
</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" :key="index">{{ item.name }}</el-breadcrumb-item> <el-breadcrumb-item v-for="(item, index) in titie" :key="index">{{ item.name }}
</el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
</div> </div>
</li> </li>
@ -49,9 +52,9 @@
</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;
@ -181,10 +184,10 @@
} }
}, },
}, },
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.table { .table {
background-color: #fff; background-color: #fff;
ul { ul {
@ -241,76 +244,82 @@
display: flex; display: flex;
} }
} }
.width { .width {
transition: all 0.3s; transition: all 0.3s;
opacity: 0; opacity: 0;
width: 0px !important; width: 0px !important;
} }
.width1 { .width1 {
transition: all 0.3s; transition: all 0.3s;
opacity: 1; opacity: 1;
width: 200px !important; width: 200px !important;
} }
.el-container { .el-container {
height: 100vh; height: 100vh;
} }
.el-header { .el-header {
background-color: #b3c0d1; background-color: #b3c0d1;
color: #333; color: #333;
text-align: center; text-align: center;
} }
.el-aside { .el-aside {
background-color: #d3dce6; background-color: #d3dce6;
color: #333; color: #333;
text-align: center; text-align: center;
overflow-x: hidden; overflow-x: hidden;
} }
.el-aside::-webkit-scrollbar { .el-aside::-webkit-scrollbar {
width: 8px; width: 8px;
/*对垂直流动条有效*/ /*对垂直流动条有效*/
} }
.el-aside::-webkit-scrollbar-thumb { .el-aside::-webkit-scrollbar-thumb {
background-color: rgba(144, 147, 153, 0.3); background-color: rgba(144, 147, 153, 0.3);
border-radius: 20px; border-radius: 20px;
} }
.el-main { .el-main {
background-color: #f0f2f5; background-color: #f0f2f5;
color: #333; color: #333;
padding: 0 0 !important; padding: 0 0 !important;
} }
.el-main::-webkit-scrollbar { .el-main::-webkit-scrollbar {
width: 10px; width: 10px;
/*对垂直流动条有效*/ /*对垂直流动条有效*/
} }
.el-main::-webkit-scrollbar-thumb { .el-main::-webkit-scrollbar-thumb {
background-color: rgba(144, 147, 153, 0.3); background-color: rgba(144, 147, 153, 0.3);
} }
.box-card { .box-card {
background-color: #fff; background-color: #fff;
min-height: calc(100vh - 200px); min-height: calc(100vh - 120px);
margin: 10px; margin: 10px;
padding: 20px; padding: 20px;
} }
.add { .conent {
width: 100%;
min-height: calc(100vh - 200px);
position: relative;
}
.add {
cursor: pointer; cursor: pointer;
font-size: 25px; font-size: 25px;
color: #606266; color: #606266;
} }
.head { .head {
padding: 10px; padding: 10px;
background-color: #fff; background-color: #fff;
border-bottom: 1px solid #f6f6f6; border-bottom: 1px solid #f6f6f6;
@ -333,33 +342,47 @@
} }
} }
} }
} }
.el-aside { .el-aside {
background: #282c34; background: #282c34;
box-shadow: 2px 0 6px rgb(0 21 41 / 35%); box-shadow: 2px 0 6px rgb(0 21 41 / 35%);
} }
::v-deep .el-menu { ::v-deep .el-menu {
border: none; border: none;
} }
// .el-menu-item { // .el-menu-item {
// margin: 0 20px 10px; // margin: 0 20px 10px;
// } // }
.el-menu-item:hover { .el-menu-item:hover {
outline: 0 !important; outline: 0 !important;
background: #5470c6 !important; background: #5470c6 !important;
border-radius: 5px !important; border-radius: 5px !important;
} }
.el-menu-item.is-active { .el-menu-item.is-active {
color: #fff !important; color: #fff !important;
background: #5470c6 !important; background: #5470c6 !important;
border-radius: 5px !important; border-radius: 5px !important;
} }
.el-menu-item-group__title { .el-menu-item-group__title {
padding: 0 0 !important; padding: 0 0 !important;
} }
.table {
margin-top: 20px;
}
.block {
margin-top: 30px;
}
.from-btn {
display: flex;
justify-content: space-around;
align-content: center;
}
</style> </style>

View File

@ -1,30 +1,33 @@
<template> <template>
<div> <div>
<!-- 筛选框 --> <!-- 筛选框 -->
<el-card class="box-card"> <el-card class="box-card" :body-style="{ padding: '20px 20px 0 20px' }">
<div class="goods" style="margin: 20px">
<el-form ref="form" :inline="true" :model="form"> <el-form ref="form" :inline="true" :model="form">
<el-form-item label="模块:" style="margin-right: 40px"> <el-form-item label="模块:" style="margin-right: 40px">
<el-select v-model="form.module" clearable > <el-select v-model="form.module" clearable>
<el-option v-for="item in mouduleOptions" :key="item.value" :label="item.label" :value="item.value"> <el-option v-for="item in mouduleOptions" :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="操作:" style="margin-right: 40px"> <el-form-item label="操作:" style="margin-right: 40px">
<el-select v-model="form.action" clearable> <el-select v-model="form.action" clearable>
<el-option v-for="item in actionOptions" :key="item.value" :label="item.label" :value="item.value"> <el-option v-for="item in actionOptions" :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="目标类型:" style="margin-right: 40px"> <el-form-item label="目标类型:" style="margin-right: 40px">
<el-select v-model="form.target_type" clearable> <el-select v-model="form.target_type" clearable>
<el-option v-for="item in target_ypeOptions" :key="item.value" :label="item.label" :value="item.value"> <el-option v-for="item in target_ypeOptions" :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="类别:" style="margin-right: 40px"> <el-form-item label="类别:" style="margin-right: 40px">
<el-select v-model="form.targetField" clearable> <el-select v-model="form.targetField" clearable>
<el-option v-for="item in target_fieldOptions" :key="item.value" :label="item.label" :value="item.value"> <el-option v-for="item in target_fieldOptions" :key="item.value" :label="item.label"
:value="item.value">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -43,7 +46,6 @@
<el-button type="primary" @click="query()">查询</el-button> <el-button type="primary" @click="query()">查询</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div>
</el-card> </el-card>
<!-- 表格 --> <!-- 表格 -->
@ -58,28 +60,28 @@
<el-table-column label="操作前"> <el-table-column label="操作前">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="height:45px"> <div style="height:45px">
{{scope.row.before_update}} {{ scope.row.before_update }}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作后"> <el-table-column label="操作后">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="height:45px"> <div style="height:45px">
{{scope.row.after_update}} {{ scope.row.after_update }}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="信息" width="300"> <el-table-column label="信息" width="300">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="overflow-x: hidden;white-space: nowrap;"> <div style="overflow-x: hidden;white-space: nowrap;">
{{scope.row.message}} {{ scope.row.message }}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="user.name" label="操作人" width="120"></el-table-column> <el-table-column prop="user.name" label="操作人" width="120"></el-table-column>
<el-table-column label="操作时间" width="100"> <el-table-column label="操作时间" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{scope.row.created_at}}</p> <p>{{ scope.row.created_at }}</p>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -87,18 +89,18 @@
<!-- 分页功能 --> <!-- 分页功能 -->
<div class="block"> <div class="block">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="current_page" <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:page-sizes="[15, 50, 100]" :page-size="per_page" layout="total, sizes, prev, pager, next, jumper" :current-page="current_page" :page-sizes="[15, 50, 100]" :page-size="per_page"
:total="Paginationdata.total"> layout="total, sizes, prev, pager, next, jumper" :total="Paginationdata.total">
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { recordList } from "../../api/record"; import { recordList } from "../../api/record";
import { userList } from "../../api/user"; import { userList } from "../../api/user";
export default { export default {
data() { data() {
return { return {
target_fieldOptions: [ target_fieldOptions: [
@ -187,7 +189,7 @@
label: "快团团增量下载订单", label: "快团团增量下载订单",
}, },
], // ], //
mouduleOptions:[ mouduleOptions: [
{ {
value: "menu", value: "menu",
label: "菜单", label: "菜单",
@ -217,7 +219,7 @@
label: "平台", label: "平台",
}, },
],// ],//
actionOptions:[ actionOptions: [
{ {
value: "POST", value: "POST",
label: "新增", label: "新增",
@ -235,7 +237,7 @@
label: "查看", label: "查看",
}, },
],// ],//
target_ypeOptions:[ target_ypeOptions: [
{ {
value: "upload", value: "upload",
label: "上传", label: "上传",
@ -283,9 +285,9 @@
],// ],//
userOptions: [], // userOptions: [], //
form: { form: {
module:'',// goods-(),'menu' => '',file-,permission-,role-,user-,plat- module: '',// goods-(),'menu' => '',file-,permission-,role-,user-,plat-
action:'',// POST-,PATCH-,DELETE-,'GET' => '', action: '',// POST-,PATCH-,DELETE-,'GET' => '',
target_type:'',// upload-,goods_sku,goods_brand-,goods_type-,menu-,permission-,role-,user-,kuaituantuan-,miaoxuan-,'goods' => '', target_type: '',// upload-,goods_sku,goods_brand-,goods_type-,menu-,permission-,role-,user-,kuaituantuan-,miaoxuan-,'goods' => '',
targetField: "",// targetField: "",//
userId: "",//id() userId: "",//id()
}, },
@ -323,13 +325,13 @@
page: this.current_page, page: this.current_page,
per_page: this.per_page, per_page: this.per_page,
module: this.form.module, module: this.form.module,
action:this.form.action, action: this.form.action,
target_type:this.form.target_type, target_type: this.form.target_type,
target_id: this.$route.query.id?this.$route.query.id:'', target_id: this.$route.query.id ? this.$route.query.id : '',
target_field: this.form.targetField?this.form.targetField:'', target_field: this.form.targetField ? this.form.targetField : '',
user_id: this.form.userId, user_id: this.form.userId,
start_time: this.value1[0]?this.value1[0]:'', start_time: this.value1[0] ? this.value1[0] : '',
end_time: this.value1[1]?this.value1[1]:'', end_time: this.value1[1] ? this.value1[1] : '',
}; };
recordList(queryData).then((res) => { recordList(queryData).then((res) => {
@ -354,14 +356,15 @@
this.getList(); this.getList();
this.getUser(); this.getUser();
}, },
}; };
</script> </script>
<style scoped> <style lang="scss" scoped>
.block { .block {
margin-top: 30px; margin-top: 30px;
} }
::v-deep .el-card__body {
::v-deep .el-card__body {
padding: 0; padding: 0;
} }
</style> </style>

View File

@ -1,8 +1,7 @@
<template> <template>
<div> <div>
<!-- 筛选框 --> <!-- 筛选框 -->
<el-card class="box-card"> <el-card :body-style="{ padding: '20px 20px 0 20px' }">
<div class="goods" 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.targetField" placeholder="全部"> <el-select v-model="form.targetField" placeholder="全部">
@ -25,11 +24,10 @@
<el-button type="primary" @click="query()">查询</el-button> <el-button type="primary" @click="query()">查询</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div>
</el-card> </el-card>
<!-- 表格 --> <!-- 表格 -->
<el-card style="margin-top: 30px" class="box-card"> <el-card style="margin-top: 30px">
<el-table :data="tableData" style="width: 100%" border> <el-table :data="tableData" style="width: 100%" border>
<el-table-column prop="id" label="序号" width="70"> </el-table-column> <el-table-column prop="id" label="序号" width="70"> </el-table-column>
<el-table-column prop="created_at" label="时间" width="200"> <el-table-column prop="created_at" label="时间" width="200">
@ -47,18 +45,18 @@
<!-- 分页功能 --> <!-- 分页功能 -->
<div class="block"> <div class="block">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="current_page" <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:page-sizes="[15, 50, 100]" :page-size="per_page" layout="total, sizes, prev, pager, next, jumper" :current-page="current_page" :page-sizes="[15, 50, 100]" :page-size="per_page"
:total="Paginationdata.total"> layout="total, sizes, prev, pager, next, jumper" :total="Paginationdata.total">
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { userList } from "../../api/user"; import { userList } from "../../api/user";
import { recordList } from "../../api/record"; import { recordList } from "../../api/record";
export default { export default {
data() { data() {
return { return {
options: [ options: [
@ -175,11 +173,5 @@
this.getList(); this.getList();
this.getUser(); this.getUser();
}, },
}; };
</script> </script>
<style>
.block {
margin-top: 30px;
}
</style>

View File

@ -1,9 +1,7 @@
<template> <template>
<div class="conent"> <div class="conent">
<!-- 新增按钮 --> <!-- 新增按钮 -->
<div class="btn">
<el-button type="primary" @click="handAdd">新增</el-button> <el-button type="primary" @click="handAdd">新增</el-button>
</div>
<div class="table"> <div class="table">
<el-table :data="tableData" style="width: 100%"> <el-table :data="tableData" style="width: 100%">
@ -13,8 +11,10 @@
<el-table-column prop="plat_id" label="所属平台"></el-table-column> <el-table-column prop="plat_id" label="所属平台"></el-table-column>
<el-table-column label="操作"> <el-table-column label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="danger" v-if="scope.row.status === '未授权'"><a :href="scope.row.authUrl" target="_blank" <el-button type="danger" v-if="scope.row.status === '未授权'"><a :href="scope.row.authUrl"
rel="noopener noreferrer">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></el-button> target="_blank"
rel="noopener noreferrer">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
</el-button>
<div v-if="scope.row.status === '已授权'"> <div v-if="scope.row.status === '已授权'">
<el-button type="success" :disabled="true">{{ <el-button type="success" :disabled="true">{{
scope.row.status scope.row.status
@ -22,7 +22,8 @@
<el-button @click="download(scope.row)">下载商品</el-button> <el-button @click="download(scope.row)">下载商品</el-button>
</div> </div>
<div v-if="scope.row.status === '重新授权'"> <div v-if="scope.row.status === '重新授权'">
<el-button type="danger" target="_blank"><a :href="scope.row.authUrl" rel="noopener noreferrer">重新授权</a> <el-button type="danger" target="_blank"><a :href="scope.row.authUrl"
rel="noopener noreferrer">重新授权</a>
</el-button> </el-button>
<el-button @click="download(scope.row)">下载商品</el-button> <el-button @click="download(scope.row)">下载商品</el-button>
</div> </div>
@ -38,6 +39,14 @@
</el-table> </el-table>
</div> </div>
<!-- 分页功能 -->
<div class="block">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:current-page="current_page" :page-sizes="[15, 50, 100]" :page-size="per_page"
layout="total, sizes, prev, pager, next, jumper" :total="Paginationdata.total">
</el-pagination>
</div>
<!-- 新增店铺 --> <!-- 新增店铺 -->
<el-dialog title="新增店铺" :visible.sync="dialogFormVisible" :close-on-click-modal="false"> <el-dialog title="新增店铺" :visible.sync="dialogFormVisible" :close-on-click-modal="false">
<el-form :model="form"> <el-form :model="form">
@ -56,20 +65,12 @@
<el-button type="primary" @click="addSubmit"> </el-button> <el-button type="primary" @click="addSubmit"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<!-- 分页功能 -->
<div class="block">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="current_page"
:page-sizes="[15, 50, 100]" :page-size="per_page" layout="total, sizes, prev, pager, next, jumper"
:total="Paginationdata.total">
</el-pagination>
</div>
</div> </div>
</template> </template>
<script> <script>
import { shopListId, shopAdd, storeList, downloadGoods } from "../../api/shop"; import { shopListId, shopAdd, storeList, downloadGoods } from "../../api/shop";
export default { export default {
data() { data() {
return { return {
dialogFormVisible: false, dialogFormVisible: false,
@ -149,40 +150,15 @@
}); });
}, },
}, },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
a { a {
text-decoration: none; text-decoration: none;
color: white; color: white;
} }
.block {
.conent {
width: 100%;
min-height: calc(100vh - 200px);
position: relative;
}
.btn {
height: 104px;
border-radius: 5px;
display: flex;
align-items: center;
}
.el-button {
width: 114px;
height: 44px;
border-radius: 3px;
}
.table {
margin-top: 20px;
}
.block {
margin-top: 30px; margin-top: 30px;
} }
</style> </style>

View File

@ -1,10 +1,5 @@
<template> <template>
<div class="conent"> <div class="conent">
<!-- 新增按钮 -->
<div class="btn">
<el-button type="primary" @click="dialogVisible2 = true">新增</el-button>
</div>
<!-- 点击新增弹出表单 --> <!-- 点击新增弹出表单 -->
<div class="from"> <div class="from">
<el-dialog title="新增角色" :visible.sync="dialogVisible2" width="30%" :close-on-click-modal="false"> <el-dialog title="新增角色" :visible.sync="dialogVisible2" width="30%" :close-on-click-modal="false">
@ -22,7 +17,10 @@
</el-dialog> </el-dialog>
</div> </div>
<!-- 角色表单 --> <!-- 新增按钮 -->
<el-button type="primary" @click="dialogVisible2 = true">新增</el-button>
<!-- 角色列表 -->
<div class="table"> <div class="table">
<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>
@ -43,7 +41,8 @@
<!-- 点击编辑弹出权限框 --> <!-- 点击编辑弹出权限框 -->
<el-dialog title="编辑权限" :visible.sync="dialogVisible" width="30%" :close-on-click-modal="false"> <el-dialog title="编辑权限" :visible.sync="dialogVisible" width="30%" :close-on-click-modal="false">
<el-tree v-if="isShowtree" :data="Role_Permission" show-checkbox :default-expand-all="false" node-key="id" <el-tree v-if="isShowtree" :data="Role_Permission" show-checkbox :default-expand-all="false" node-key="id"
ref="tree" highlight-current :props="defaultProps" :default-checked-keys="chekedKeys" v-model="permissionIds"> ref="tree" highlight-current :props="defaultProps" :default-checked-keys="chekedKeys"
v-model="permissionIds">
</el-tree> </el-tree>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="cancel()"> </el-button> <el-button @click="cancel()"> </el-button>
@ -54,13 +53,13 @@
</template> </template>
<script> <script>
import { import {
roleList, roleList,
roleAdd, roleAdd,
jurisdiction, jurisdiction,
jurisdictionEdit, jurisdictionEdit,
} from "../../api/role.js"; } from "../../api/role.js";
export default { export default {
data() { data() {
return { return {
id: "", //id id: "", //id
@ -153,37 +152,8 @@
}); });
}, },
}, },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.conent {
width: 100%;
min-height: calc(100vh - 200px);
}
.btn {
height: 104px;
border-radius: 5px;
display: flex;
align-items: center;
}
.el-button {
width: 114px;
height: 44px;
border-radius: 3px;
}
.table {
margin-top: 20px;
}
.from-btn {
display: flex;
justify-content: space-around;
align-content: center;
}
</style> </style>

View File

@ -1,9 +1,5 @@
<template> <template>
<div class="conent"> <div class="conent">
<!-- 新增按钮 -->
<div class="btn">
<el-button type="primary" @click="dialogVisible = true">新增</el-button>
</div>
<!-- 点击新增弹出表单 --> <!-- 点击新增弹出表单 -->
<div class="from"> <div class="from">
@ -22,7 +18,8 @@
<el-form-item label="角色"> <el-form-item label="角色">
<template> <template>
<el-select v-model="value" placeholder="请选择"> <el-select v-model="value" placeholder="请选择">
<el-option v-for="item in roleOptions" :key="item.value" :label="item.name" :value="item.name"> <el-option v-for="item in roleOptions" :key="item.value" :label="item.name"
:value="item.name">
</el-option> </el-option>
</el-select> </el-select>
</template> </template>
@ -53,7 +50,8 @@
<el-form-item label="角色"> <el-form-item label="角色">
<template> <template>
<el-select v-model="edit_from.role_name" placeholder="请选择"> <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 v-for="item in roleOptions" :key="item.value" :label="item.name"
:value="item.name">
</el-option> </el-option>
</el-select> </el-select>
</template> </template>
@ -73,6 +71,9 @@
</el-dialog> </el-dialog>
</div> </div>
<!-- 新增按钮 -->
<el-button type="primary" @click="dialogVisible = true">新增</el-button>
<!-- 用户列表 --> <!-- 用户列表 -->
<div class="table"> <div class="table">
<template> <template>
@ -96,23 +97,23 @@
<!-- 分页功能 --> <!-- 分页功能 -->
<div class="block"> <div class="block">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="current_page" <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:page-sizes="[15, 50, 100]" :page-size="per_page" layout="total, sizes, prev, pager, next, jumper" :current-page="current_page" :page-sizes="[15, 50, 100]" :page-size="per_page"
:total="Paginationdata.total"> layout="total, sizes, prev, pager, next, jumper" :total="Paginationdata.total">
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { import {
userList, userList,
userAdd, userAdd,
userEdit, userEdit,
userConfirm, userConfirm,
roleList, roleList,
} from "../../api/user"; } from "../../api/user";
export default { export default {
data() { data() {
return { return {
id: "", id: "",
@ -222,41 +223,11 @@
this.getList(); this.getList();
}, },
}, },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.conent { .block {
width: 100%;
min-height: calc(100vh - 200px);
position: relative;
}
.btn {
height: 104px;
border-radius: 5px;
display: flex;
align-items: center;
}
.el-button {
width: 114px;
height: 44px;
border-radius: 3px;
}
.table {
margin-top: 20px;
}
.from-btn {
display: flex;
justify-content: space-around;
align-content: center;
}
.block {
margin-top: 30px; margin-top: 30px;
} }
</style> </style>