|
|
|
@ -38,10 +38,22 @@
|
|
|
|
|
</el-button> |
|
|
|
|
|
|
|
|
|
</template> |
|
|
|
|
<template #knifeSwitch="scope"> |
|
|
|
|
<!-- <span>{{scope.row.knifeSwitch}}</span>--> |
|
|
|
|
<!-- <avue-switch :="scope.row.knifeSwitch == '1' ? true : false"--> |
|
|
|
|
<!-- @click="rowState(scope.row)"></avue-switch>--> |
|
|
|
|
<el-switch v-model="scope.row.knifeSwitch" active-text="开启" |
|
|
|
|
inactive-text="关闭" @change="rowState(scope.row)"></el-switch> |
|
|
|
|
</template> |
|
|
|
|
<!-- <template slot="knifeSwitch"--> |
|
|
|
|
<!-- slot-scope="scope">--> |
|
|
|
|
|
|
|
|
|
<template #status="scope"> |
|
|
|
|
<el-switch v-model="scope.row.status" :active-value="0" :inactive-value="1" @change="switChange(scope.row)"></el-switch> |
|
|
|
|
</template> |
|
|
|
|
<!-- </template>--> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!--<template #status="scope"> |
|
|
|
|
<el-switch v-model="scope.row.status" :active-value="0" :inactive-value="1" @change="switChange(scope.row)"></el-switch> |
|
|
|
|
</template>--> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -103,6 +115,29 @@
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
// |
|
|
|
|
rowState(row){ |
|
|
|
|
// console.log("row",row); |
|
|
|
|
let aa ={ |
|
|
|
|
id: row.id, |
|
|
|
|
knifeSwitch: row.knifeSwitch |
|
|
|
|
} |
|
|
|
|
this.$confirm("确定关闭该模板?", { |
|
|
|
|
confirmButtonText: "确定", |
|
|
|
|
cancelButtonText: "取消", |
|
|
|
|
type: "warning" |
|
|
|
|
}) |
|
|
|
|
.then(() => { |
|
|
|
|
return update(aa); |
|
|
|
|
}) |
|
|
|
|
.then(() => { |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
this.$message({ |
|
|
|
|
type: "success", |
|
|
|
|
message: "操作成功!" |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
rowSave(row, done, loading) { |
|
|
|
|
console.log("row",row); |
|
|
|
|
row.fileName = this.fileName; |
|
|
|
|