通用样式整理
This commit is contained in:
parent
d24e109be8
commit
49021d9933
@ -58,8 +58,8 @@ a:hover {
|
|||||||
padding: 20px;
|
padding: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*外框样式*/
|
//外框样式
|
||||||
.container-frame{
|
.container-frame {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
border: 1px solid rgb(235, 235, 235);
|
border: 1px solid rgb(235, 235, 235);
|
||||||
border-image: initial;
|
border-image: initial;
|
||||||
@ -67,3 +67,35 @@ a:hover {
|
|||||||
transition: 0.2s;
|
transition: 0.2s;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//搜索栏样式
|
||||||
|
.filter-container {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//操作栏样式
|
||||||
|
.operate-container {
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.operate-container .btn-add {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
//表格栏样式
|
||||||
|
.table-container {
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
//批量操作栏样式
|
||||||
|
.batch-operate-container {
|
||||||
|
display: inline-block;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
//分页栏样式
|
||||||
|
.pagination-container {
|
||||||
|
display: inline-block;
|
||||||
|
float: right;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
<i class="el-icon-tickets" style="margin-top: 5px"></i>
|
<i class="el-icon-tickets" style="margin-top: 5px"></i>
|
||||||
<span style="margin-top: 5px">数据列表</span>
|
<span style="margin-top: 5px">数据列表</span>
|
||||||
<el-button
|
<el-button
|
||||||
|
class="btn-add"
|
||||||
@click="addBrand()"
|
@click="addBrand()"
|
||||||
size="mini">
|
size="mini">
|
||||||
添加
|
添加
|
||||||
@ -138,7 +139,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import {fetchList, updateShowStatus,updateFactoryStatus,deleteBrand} from '@/api/brand'
|
import {fetchList, updateShowStatus, updateFactoryStatus, deleteBrand} from '@/api/brand'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'brandList',
|
name: 'brandList',
|
||||||
data() {
|
data() {
|
||||||
@ -183,7 +185,7 @@
|
|||||||
this.multipleSelection = val;
|
this.multipleSelection = val;
|
||||||
},
|
},
|
||||||
handleUpdate(index, row) {
|
handleUpdate(index, row) {
|
||||||
this.$router.push({path: '/pms/updateBrand',query:{id:row.id}})
|
this.$router.push({path: '/pms/updateBrand', query: {id: row.id}})
|
||||||
},
|
},
|
||||||
handleDelete(index, row) {
|
handleDelete(index, row) {
|
||||||
this.$confirm('是否要删除该品牌', '提示', {
|
this.$confirm('是否要删除该品牌', '提示', {
|
||||||
@ -191,11 +193,11 @@
|
|||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
deleteBrand(row.id).then(response=>{
|
deleteBrand(row.id).then(response => {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: '删除成功',
|
message: '删除成功',
|
||||||
type: 'success',
|
type: 'success',
|
||||||
duration:1000
|
duration: 1000
|
||||||
});
|
});
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
@ -209,13 +211,13 @@
|
|||||||
},
|
},
|
||||||
handleFactoryStatusChange(index, row) {
|
handleFactoryStatusChange(index, row) {
|
||||||
var data = new URLSearchParams();
|
var data = new URLSearchParams();
|
||||||
data.append("ids",row.id);
|
data.append("ids", row.id);
|
||||||
data.append("factoryStatus",row.factoryStatus);
|
data.append("factoryStatus", row.factoryStatus);
|
||||||
updateFactoryStatus(data).then(response => {
|
updateFactoryStatus(data).then(response => {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: '修改成功',
|
message: '修改成功',
|
||||||
type: 'success',
|
type: 'success',
|
||||||
duration:1000
|
duration: 1000
|
||||||
});
|
});
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
if (row.factoryStatus === 0) {
|
if (row.factoryStatus === 0) {
|
||||||
@ -226,14 +228,15 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleShowStatusChange(index, row) {
|
handleShowStatusChange(index, row) {
|
||||||
let data = new URLSearchParams();;
|
let data = new URLSearchParams();
|
||||||
data.append("ids",row.id);
|
;
|
||||||
data.append("showStatus",row.showStatus);
|
data.append("ids", row.id);
|
||||||
|
data.append("showStatus", row.showStatus);
|
||||||
updateShowStatus(data).then(response => {
|
updateShowStatus(data).then(response => {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: '修改成功',
|
message: '修改成功',
|
||||||
type: 'success',
|
type: 'success',
|
||||||
duration:1000
|
duration: 1000
|
||||||
});
|
});
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
if (row.showStatus === 0) {
|
if (row.showStatus === 0) {
|
||||||
@ -258,40 +261,40 @@
|
|||||||
},
|
},
|
||||||
handleBatchOperate() {
|
handleBatchOperate() {
|
||||||
console.log(this.multipleSelection);
|
console.log(this.multipleSelection);
|
||||||
if(this.multipleSelection<1){
|
if (this.multipleSelection < 1) {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: '请选择一条记录',
|
message: '请选择一条记录',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
duration:1000
|
duration: 1000
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let showStatus = 0;
|
let showStatus = 0;
|
||||||
if(this.operateType==='showBrand'){
|
if (this.operateType === 'showBrand') {
|
||||||
showStatus = 1;
|
showStatus = 1;
|
||||||
}else if(this.operateType==='hideBrand'){
|
} else if (this.operateType === 'hideBrand') {
|
||||||
showStatus = 0;
|
showStatus = 0;
|
||||||
}else{
|
} else {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: '请选择批量操作类型',
|
message: '请选择批量操作类型',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
duration:1000
|
duration: 1000
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let ids = [];
|
let ids = [];
|
||||||
for(let i=0;i<this.multipleSelection.length;i++){
|
for (let i = 0; i < this.multipleSelection.length; i++) {
|
||||||
ids.push(this.multipleSelection[i].id);
|
ids.push(this.multipleSelection[i].id);
|
||||||
}
|
}
|
||||||
let data = new URLSearchParams();
|
let data = new URLSearchParams();
|
||||||
data.append("ids",ids);
|
data.append("ids", ids);
|
||||||
data.append("showStatus",showStatus);
|
data.append("showStatus", showStatus);
|
||||||
updateShowStatus(data).then(response => {
|
updateShowStatus(data).then(response => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$message({
|
this.$message({
|
||||||
message: '修改成功',
|
message: '修改成功',
|
||||||
type: 'success',
|
type: 'success',
|
||||||
duration:1000
|
duration: 1000
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -302,32 +305,7 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
.filter-container {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.operate-container {
|
|
||||||
margin-top: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.operate-container .el-button {
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-container {
|
|
||||||
margin-top: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.batch-operate-container {
|
|
||||||
display: inline-block;
|
|
||||||
margin-top: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pagination-container {
|
|
||||||
display: inline-block;
|
|
||||||
float: right;
|
|
||||||
margin-top: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
<i class="el-icon-tickets" style="margin-top: 5px"></i>
|
<i class="el-icon-tickets" style="margin-top: 5px"></i>
|
||||||
<span style="margin-top: 5px">数据列表</span>
|
<span style="margin-top: 5px">数据列表</span>
|
||||||
<el-button
|
<el-button
|
||||||
|
class="btn-add"
|
||||||
@click="addProductAttrCate()"
|
@click="addProductAttrCate()"
|
||||||
size="mini">
|
size="mini">
|
||||||
添加
|
添加
|
||||||
@ -198,19 +199,6 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
.operate-container .el-button {
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-container {
|
|
||||||
margin-top: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pagination-container {
|
|
||||||
display: inline-block;
|
|
||||||
float: right;
|
|
||||||
margin-top: 20px;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
<i class="el-icon-tickets" style="margin-top: 5px"></i>
|
<i class="el-icon-tickets" style="margin-top: 5px"></i>
|
||||||
<span style="margin-top: 5px">数据列表</span>
|
<span style="margin-top: 5px">数据列表</span>
|
||||||
<el-button
|
<el-button
|
||||||
|
class="btn-add"
|
||||||
@click="addProductAttr()"
|
@click="addProductAttr()"
|
||||||
size="mini">
|
size="mini">
|
||||||
添加
|
添加
|
||||||
@ -212,28 +213,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
.operate-container {
|
|
||||||
margin-top: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.operate-container .el-button {
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-container {
|
|
||||||
margin-top: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.batch-operate-container {
|
|
||||||
display: inline-block;
|
|
||||||
margin-top: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pagination-container {
|
|
||||||
display: inline-block;
|
|
||||||
float: right;
|
|
||||||
margin-top: 20px;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user