|
|
@@ -63,6 +63,17 @@
|
|
|
</span>
|
|
|
<span v-else>--</span>
|
|
|
</div>
|
|
|
+ <div v-else-if="scope.data.column.columnname == 'isenable'">
|
|
|
+ <el-switch
|
|
|
+ v-if="scope.data.column.data.issystem == 1"
|
|
|
+ v-model="scope.data.column.data[scope.data.column.columnname]"
|
|
|
+ @change="isenableChange(scope.data.column.data[scope.data.column.columnname],scope.data.column.data.rowindex,scope.data.column.data.sys_systemtagdetailid)"
|
|
|
+ :active-value="1"
|
|
|
+ :inactive-value="0"
|
|
|
+ active-color="#13ce66"
|
|
|
+ inactive-color="#ff4949">
|
|
|
+ </el-switch>
|
|
|
+ </div>
|
|
|
<div v-else>
|
|
|
{{ $t(scope.data.column.data[scope.data.column.columnname]) }}
|
|
|
</div>
|
|
|
@@ -161,6 +172,37 @@ export default {
|
|
|
this.selectTarget = this.objectList[0].sys_systemtagid;
|
|
|
console.log(this.objectList);
|
|
|
},
|
|
|
+ isenableChange(val,index,id){
|
|
|
+ console.log(val)
|
|
|
+ let message = ''
|
|
|
+ if (val == 1){
|
|
|
+ message = '确定开启该系统标签,执行系统标签程序?'
|
|
|
+ }else {
|
|
|
+ message = '确定关闭该系统标签,不再执行系统标签程序?'
|
|
|
+ }
|
|
|
+ this.$confirm(this.$t(message), this.$t('提示'), {
|
|
|
+ confirmButtonText: this.$t('确定'),
|
|
|
+ cancelButtonText: this.$t('取消'),
|
|
|
+ type: 'warning'
|
|
|
+ }).then(async () => {
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id": 2025071714190802,
|
|
|
+ "content": {
|
|
|
+ "sys_systemtagdetailid": id,
|
|
|
+ "isenable": val
|
|
|
+ },
|
|
|
+ })
|
|
|
+ if (res.code == 0){
|
|
|
+ this.tool.showMessage(res,()=>{})
|
|
|
+ }
|
|
|
+ }).catch(() => {
|
|
|
+ if (val == 1){
|
|
|
+ this.$refs.basicLayout.list[index -1].isenable = 0
|
|
|
+ }else {
|
|
|
+ this.$refs.basicLayout.list[index -1].isenable = 1
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
};
|
|
|
</script>
|