更新
This commit is contained in:
35
src/views/cost/raw/costMaterial/changeStatus.vue
Normal file
35
src/views/cost/raw/costMaterial/changeStatus.vue
Normal file
@@ -0,0 +1,35 @@
|
||||
<template>
|
||||
<el-switch
|
||||
@change="changeStatus"
|
||||
size="small"
|
||||
v-model="list.enabled"
|
||||
:active-value="1"
|
||||
:inactive-value="0"></el-switch>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { updateGroup } from '@/api/group/groupSetting';
|
||||
export default {
|
||||
props: {
|
||||
injectData: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: this.injectData,
|
||||
};
|
||||
},
|
||||
created() {},
|
||||
methods: {
|
||||
changeStatus(val) {
|
||||
const data = { ...this.injectData, enabled: val };
|
||||
updateGroup(data).then((res) => {
|
||||
this.$modal.msgSuccess('修改成功');
|
||||
this.$emit('emitData');
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user