11
This commit is contained in:
parent
2dd103fdfc
commit
175289d1d4
@ -105,7 +105,16 @@
|
||||
<el-table-column label="logo1" align="center" prop="brandImg" min-width="100" />
|
||||
<el-table-column label="logo" align="center" prop="logo" min-width="100" />
|
||||
<el-table-column label="备注" align="center" prop="remark" min-width="100" />
|
||||
<el-table-column label="启用" align="center" prop="status" min-width="100" />
|
||||
<el-table-column label="启用" align="center" prop="status" min-width="100" >
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.status"
|
||||
active-value="0"
|
||||
inactive-value="1"
|
||||
@change="handleStatusChange(scope.row)"
|
||||
></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@ -188,7 +197,13 @@
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="是否启用" prop="status">
|
||||
<el-input v-model="form.status" placeholder="请输入0-未开放" />
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
@ -218,7 +233,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listEmisBrand, getEmisBrand, delEmisBrand, addEmisBrand, updateEmisBrand } from "@/api/emis/emisBrand";
|
||||
import { listEmisBrand, getEmisBrand, delEmisBrand, addEmisBrand, updateEmisBrand,changeBrandStatus } from "@/api/emis/emisBrand";
|
||||
import elDateSimplePicker from '@/components/DatePickerAdv/elDateSimplePicker';
|
||||
import emisBrandView from '@/views/emis/emisBrand/emisBrandView';
|
||||
import emisBrandForm from '@/views/emis/emisBrand/emisBrandForm';
|
||||
@ -226,8 +241,7 @@ import emisBrandForm from '@/views/emis/emisBrand/emisBrandForm';
|
||||
export default {
|
||||
name: "emisBrand",
|
||||
components: { elDateSimplePicker,emisBrandView,emisBrandForm },
|
||||
dicts: [
|
||||
],
|
||||
dicts: ['sys_normal_disable'],
|
||||
data() {
|
||||
return {
|
||||
dialogVisible1:false,
|
||||
@ -336,6 +350,19 @@ export default {
|
||||
imgUploadHeaders(){return { }},
|
||||
},
|
||||
methods: {
|
||||
// 角色状态修改
|
||||
handleStatusChange(row) {
|
||||
|
||||
let text = row.status === "0" ? "启用" : "停用";
|
||||
this.$modal.confirm('确认要"' + text + '""' + row.name + '"品牌吗?').then(function() {
|
||||
return changeBrandStatus(row.id, row.status);
|
||||
}).then(() => {
|
||||
this.$modal.msgSuccess(text + "成功");
|
||||
}).catch(function() {
|
||||
row.status = row.status === "0" ? "1" : "0";
|
||||
});
|
||||
|
||||
},
|
||||
handlePictureCardPreview(file){
|
||||
//console.log(file)
|
||||
this.dialogImageUrl = file.url;
|
||||
@ -427,6 +454,9 @@ export default {
|
||||
this.queryParams.params["endUpdateTime"] = this.daterangeUpdateTime[1];
|
||||
}
|
||||
listEmisBrand(this.addDateRange(this.queryParams, this.dateTimeRange)).then(response => {
|
||||
response.rows.forEach(item =>{
|
||||
response.rows.status = item.status+"";
|
||||
});
|
||||
this.emisBrandList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
@ -496,7 +526,9 @@ export default {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getEmisBrand(id).then(response => {
|
||||
response.data.status = response.data.status+"";
|
||||
this.form = response.data;
|
||||
console.log(this.form);
|
||||
this.open = true;
|
||||
this.title = "修改";
|
||||
if(this.form.brandImg != null){
|
||||
|
||||
Loading…
Reference in New Issue
Block a user