Merge remote-tracking branch 'origin/master'

master
魔神煜修罗皇 2 years ago
commit 923712cd09
  1. 40
      psdc-ui/src/views/emonitor/wdcgq/index.vue
  2. 454
      psdc-ui/src/views/system/cl/index.vue

@ -97,29 +97,37 @@ export default {
getWdcgq("温度传感器").then((res)=>{ getWdcgq("温度传感器").then((res)=>{
console.log(res) console.log(res)
if(res.data!=null) { if(res.data!=null) {
let arr = [] var brr = []
let brr = [] data.wdcgqList=[
let crr = [] {
for (let i in res.data) { name:'室内温度',
if(res.data[i].deviceTemp == null){ temp:res.data[0].houseInTemp,
res.data[i].deviceTemp = '-- ' },
{
name:'室外温度',
temp:res.data[0].houseOutTemp,
} }
arr.push({name: res.data[i].deviceName, temp: res.data[i].deviceTemp}) ]
brr.push({ brr.push(
name: res.data[i].deviceName, {
name: '室内温度',
type: "line",
data: res.data[0].listTempIn,
itemStyle: { //线
color: '#F5901A',
}
},
{
name: '室外温度',
type: "line", type: "line",
data: res.data[i].temps, data: res.data[0].listTempOut,
itemStyle: { //线 itemStyle: { //线
color: '#F5901A', color: '#F5901A',
} }
}) }
crr.push(res.data[i].times) )
} }
// console.log('arr',arr)
data.info = arr
data.infos = brr data.infos = brr
data.xinfo = crr
}
let myChart = echarts.getInstanceByDom(document.getElementById("myEcharts")); let myChart = echarts.getInstanceByDom(document.getElementById("myEcharts"));
if (myChart){ if (myChart){
myChart.dispose() myChart.dispose()

@ -30,7 +30,7 @@
<el-table-column label="操作" align="center" prop="handle"> <el-table-column label="操作" align="center" prop="handle">
<template v-slot="scope"> <template v-slot="scope">
<el-button type="primary" size="small" icon="Edit" v-hasPermi="['system:cl:edit']" @click="handleXg(scope.row)">修改</el-button> <el-button type="primary" size="small" icon="Edit" v-hasPermi="['system:cl:edit']" @click="handleXg(scope.row)">修改</el-button>
<el-button type="danger" size="small" :icon="Delete" @click="handleDel(scope.row.sceneCode)">删除</el-button> <el-button type="danger" size="small" :icon="Delete" @click="handleDel(scope.row.strategyCode)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -69,7 +69,7 @@
<el-collapse v-model="activeNames" accordion> <el-collapse v-model="activeNames" accordion>
<el-collapse-item v-for="item in items" :key="item.id" :title="item.title" :name="item.id"> <el-collapse-item v-for="item in data.items" :key="item.id" :title="item.title" :name="item.id">
<span style="width: 50px; margin-left: 20px;margin-bottom: 50px ">步骤名称</span> <span style="width: 50px; margin-left: 20px;margin-bottom: 50px ">步骤名称</span>
<el-input v-model="item.sceneName" placeholder="请输入步骤名称" style="width: 950px;margin-bottom: 10px "/> <el-input v-model="item.sceneName" placeholder="请输入步骤名称" style="width: 950px;margin-bottom: 10px "/>
<span style="width: 50px; margin-left: 20px ">步骤描述</span> <span style="width: 50px; margin-left: 20px ">步骤描述</span>
@ -96,11 +96,11 @@
</el-collapse-item> </el-collapse-item>
</el-collapse> </el-collapse>
<el-checkbox :indeterminate="item.isIndeterminate" v-model="item.checkAll" @change="handleCheckAllChange">全选</el-checkbox> <!-- <el-checkbox :indeterminate="item.isIndeterminate" v-model="item.checkAll" @change="handleCheckAllChange">全选</el-checkbox>-->
<el-checkbox-group v-model="item.checkedSblb" @change="handleCheckedCitiesChange" style="white-space: normal;display: inline-block"> <el-checkbox-group :max="1" v-model="item.checkedSblb" @change="handleCheckedCitiesChange" style="white-space: normal;display: inline-block">
<el-checkbox v-for="item in data.sblb" :label="item.deviceId" :key="item.deviceId" style="margin-bottom: 10px;width: 560px;"> <el-checkbox v-for="it in item.sblb" :label="it.deviceId" :key="it.deviceId" style="margin-bottom: 10px;width: 560px;">
<span style="width: 160px;display: inline-block">{{item.deviceName}}</span> <span style="width: 160px;display: inline-block">{{it.deviceName}}</span>
<span v-for="control in item.controlKey" style="margin-left: 20px"> <span v-for="control in it.controlKey" style="margin-left: 20px">
<span style="width: 80px;display: inline-block">{{control.label}}</span> <span style="width: 80px;display: inline-block">{{control.label}}</span>
<template v-if="control.label === '控制启停'"> <template v-if="control.label === '控制启停'">
<el-radio-group v-model="control.value"> <el-radio-group v-model="control.value">
@ -132,46 +132,54 @@
</template> </template>
</el-dialog> </el-dialog>
<!-- 修改对话框 --> <!-- 修改对话框 -->
<el-dialog :title="title1" v-model="open1" width="1000px" append-to-body> <el-dialog :title="title1" v-model="open1" width="1100px" append-to-body>
<el-form :model="timingForm1" ref="userRef" label-width="88px"> <el-form :model="timingForm1" ref="userRef" label-width="88px">
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="策略名称:" prop="sceneName"> <el-form-item label="策略名称:" prop="sceneName">
<el-input v-model="timingForm1.sceneName" placeholder="请输入策略名称" maxlength="11" /> <el-input v-model="addForm1.strategyName" placeholder="请输入策略名称" maxlength="11" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="策略描述:" prop="sceneRemark" > <el-form-item label="策略描述:" prop="sceneRemark" >
<el-input v-model="timingForm1.sceneRemark" placeholder="请输入策略描述" /> <el-input v-model="addForm1.strategyInfo" placeholder="请输入策略描述" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<span style="width: 120px;display: inline-block ;margin: 20px">是否有限制条件</span>
<el-radio-group v-model="timingForm1.isJudge">
<el-radio :label="1"></el-radio> <el-collapse v-model="activeNames1" accordion>
<el-radio :label="2"></el-radio> <el-collapse-item v-for="item in data.items1" :key="item.id" :title="item.title" :name="item.id">
</el-radio-group> <span style="width: 50px; margin-left: 20px;margin-bottom: 50px ">步骤名称</span>
<el-collapse v-model="timingForm1.isJudge" style="width: 1000px"> <el-input v-model="item.sceneName" placeholder="请输入步骤名称" style="width: 950px;margin-bottom: 10px "/>
<el-collapse-item title="限制条件" :name="1"> <span style="width: 50px; margin-left: 20px ">步骤描述</span>
<span>限制设备</span> <el-input v-model="item.sceneRemark" placeholder="请输入步骤描述" style="width: 950px"/>
<el-select v-model="timingForm1.judgeDevice" placeholder="请选择" style="width: 240px"> <span style="width: 120px;display: inline-block ;margin: 20px">是否有限制条件</span>
<el-option :label='item.deviceName' :value='item.deviceId' :key="item.deviceId" v-for="item in data.allsblb"/> <el-radio-group v-model="item.isJudge">
</el-select> <el-radio :label="1"></el-radio>
<span style="width: 70px;display: inline-block ;margin: 20px">限制属性</span> <el-radio :label="2"></el-radio>
<el-radio-group v-model="timingForm1.judgeElement">
<el-radio label="thermometer_value">温度</el-radio>
<el-radio label="thermometer_value_in">进水温度</el-radio>
<el-radio label="thermometer_value_out">出水温度</el-radio>
</el-radio-group> </el-radio-group>
<span style="width: 70px;display: inline-block ;margin-left: 50px">温度数值</span> <el-collapse v-model="item.isJudge" style="width: 1000px">
<el-input type="number" v-model="timingForm1.judgeData" placeholder="请输入" style="width: 80px ; height: 25px" /> <el-collapse-item title="限制条件" :name="1">
</el-collapse-item> <span>限制设备</span>
</el-collapse> <el-select v-model="item.judgeDevice" placeholder="请选择" style="width: 240px">
<el-checkbox :indeterminate="data.isIndeterminate1" v-model="data.checkAll1" @change="handleCheckAllChange1">全选</el-checkbox> <el-option :label='item.deviceName' :value='item.deviceId' :key="item.deviceId" v-for="item in data.allsblb"/>
<!-- <div class="taber"><span>进水温度</span><span>出水温度</span><span>温度</span></div>--> </el-select>
<el-checkbox-group v-model="data.checkedSblb1" @change="handleCheckedCitiesChange1"> <span style="width: 70px;display: inline-block ;margin: 20px">限制属性</span>
<el-checkbox v-for="item in data.sblb" :label="item.deviceId" :key="item.deviceId" style="margin-bottom: 10px;width: 560px;"> <el-radio-group v-model="item.judgeElement">
<span style="width: 160px;display: inline-block">{{item.deviceName}}</span> <el-radio label="thermometer_value">温度</el-radio>
<span v-for="control in item.controlKey" style="margin-left: 20px"> <el-radio label="thermometer_value_in">进水温度</el-radio>
<el-radio label="thermometer_value_out">出水温度</el-radio>
</el-radio-group>
<span style="width: 70px;display: inline-block ;margin-left: 50px">限制值</span>
<el-input type="number" v-model="item.judgeData" placeholder="请输入" style="width: 80px ; height: 25px" />
</el-collapse-item>
</el-collapse>
<!-- <el-checkbox :indeterminate="item.isIndeterminate" v-model="item.checkAll" @change="handleCheckAllChange">全选</el-checkbox>-->
<el-checkbox-group :max="1" v-model="item.checkedSblb" @change="handleCheckedCitiesChange" style="white-space: normal;display: inline-block">
<el-checkbox v-for="it in item.sblb" :label="it.deviceId" :key="it.deviceId" style="margin-bottom: 10px;width: 560px;">
<span style="width: 160px;display: inline-block">{{it.deviceName}}</span>
<span v-for="control in it.controlKey" style="margin-left: 20px">
<span style="width: 80px;display: inline-block">{{control.label}}</span> <span style="width: 80px;display: inline-block">{{control.label}}</span>
<template v-if="control.label === '控制启停'"> <template v-if="control.label === '控制启停'">
<el-radio-group v-model="control.value"> <el-radio-group v-model="control.value">
@ -183,31 +191,15 @@
<el-input type="number" v-model="control.value" style="width: 120px ;margin: 10px;height: 25px"/> <el-input type="number" v-model="control.value" style="width: 120px ;margin: 10px;height: 25px"/>
</template> </template>
</span> </span>
</el-checkbox> </el-checkbox>
</el-checkbox-group> </el-checkbox-group>
<!-- <el-col :span="24">-->
<!-- <el-form-item label="设备列表:" >--> <el-button type="danger" @click="removeStep1(item.id)">删除</el-button>
<!-- <el-select v-model="timingForm1.deviceId" placeholder="设备列表">--> </el-collapse-item>
<!-- <el-option v-for="item in data.sblb" :key="item.deviceId" :label="item.deviceName" :value="item.deviceId">--> </el-collapse>
<!-- </el-option>--> <el-button type="primary" @click="addStep1">添加步骤+</el-button>
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="12">-->
<!-- <el-form-item label="进水温度:" prop="intemp" >-->
<!-- <el-input v-model="timingForm1.intemp" placeholder="进水温度" />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="12">-->
<!-- <el-form-item label="出水温度:" prop="outtemp" >-->
<!-- <el-input v-model="timingForm1.outtemp" placeholder="出水温度" />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="13">-->
<!-- <el-form-item label="温度值:" prop="temp">-->
<!-- <el-input v-model="timingForm1.temp" placeholder="温度" maxlength="11" />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row> </el-row>
</el-form> </el-form>
<template #footer> <template #footer>
@ -271,6 +263,21 @@ onMounted(()=>{
}) })
/** 筛选处理 */ /** 筛选处理 */
const data = reactive({ const data = reactive({
items:[
{ id: 1, title: '第1步', content: `步骤1的内容`,
sblb:[],
isIndeterminate:false,
checkedSblb: [],
checkAll:false,
sceneName:'',
sceneRemark:'',
deviceVos:[],
isJudge:null,
judgeDevice:null,
judgeElement:null,
judgeData:null }
],
items1:[],
num:1, num:1,
activeNames:0, activeNames:0,
checkAll: false, checkAll: false,
@ -397,6 +404,12 @@ const addForm = reactive({
strategyName:'', strategyName:'',
scenesList:[] scenesList:[]
}) })
const addForm1 = reactive({
strategyCode:'',
strategyInfo:'',
strategyName:'',
scenesList:[]
})
const timingForm = reactive({ const timingForm = reactive({
sceneName:'', sceneName:'',
sceneRemark:'', sceneRemark:'',
@ -433,26 +446,53 @@ const timingForm1 = reactive({
function handleAdd() { function handleAdd() {
open.value = true; getSb1().then((res)=>{
title.value = "新增策略"; console.log('222',res)
var arr = []
for(var i in res.data){
arr=arr.concat(res.data[i].children)
}
console.log('sblb',arr)
data.sblb=arr
addForm.strategyName=''
addForm.strategyInfo=''
data.items=[{ id: 1, title: '第1步', content: `步骤1的内容`,
sblb:data.sblb,
isIndeterminate:false,
checkedSblb: [],
checkAll:false,
sceneName:'',
sceneRemark:'',
deviceVos:[],
isJudge:null,
judgeDevice:null,
judgeElement:null,
judgeData:null }]
open.value = true;
title.value = "新增策略";
})
}; };
function submitForm() { function submitForm() {
let tempCheckedSblb = [];
data.checkedSblb.forEach(item => { for(let i in data.items){
let tempItem = { let tempCheckedSblb = [];
deviceId: item, data.items[i].checkedSblb.forEach(item => {
tempList:[] let tempItem = {
}; deviceId: item,
// item data.sblb tempList:[]
let deviceInfo = data.sblb.find(sblbItem => sblbItem.deviceId === item); };
if (deviceInfo) { // item data.sblb
console.log('11111',deviceInfo) let deviceInfo = data.items[i].sblb.find(sblbItem => sblbItem.deviceId === item);
tempItem.tempList = deviceInfo.controlKey if (deviceInfo) {
} console.log('11111',deviceInfo)
tempCheckedSblb.push(tempItem); tempItem.tempList = deviceInfo.controlKey
// items.scenesList.deviceVos=tempCheckedSblb }
}); tempCheckedSblb.push(tempItem);
addForm.scenesList.push(items) data.items[i].deviceVos=tempCheckedSblb
});
}
console.log('??????????',data.items)
addForm.scenesList=data.items
console.log(addForm) console.log(addForm)
postNew(addForm).then((res)=>{ postNew(addForm).then((res)=>{
console.log(res) console.log(res)
@ -462,88 +502,65 @@ function submitForm() {
console.log(res) console.log(res)
data.queryParams=res.data data.queryParams=res.data
}) })
addForm.strategyInfo='',
addForm.strategyName='',
timingForm.sceneName='',
timingForm.sceneRemark='',
timingForm.deviceVos=[],
timingForm.isJudge=2,
timingForm.judgeDevice=null,
timingForm.judgeElement=null,
timingForm.judgeData=null,
data.checkedSblb=[];
data.isIndeterminate=false
open.value = false; open.value = false;
data.sblb.map(item => {
item.controlKey.map(temp => {
temp.value = '';
});
});
}) })
}; };
function cancel() { function cancel() {
addForm.strategyInfo='',
addForm.strategyName='',
timingForm.sceneName='',
timingForm.sceneRemark='',
timingForm.deviceVos=[];
timingForm.isJudge=2,
timingForm.judgeDevice=null,
timingForm.judgeElement=null,
timingForm.judgeData=null
data.checkedSblb=[];
data.isIndeterminate=false
open.value = false; open.value = false;
data.sblb.map(item => {
item.controlKey.map(temp => {
temp.value = '';
});
});
}; };
function handleXg(dat) { function handleXg(dat) {
open1.value = true; open1.value = true;
title1.value = "修改策略"; title1.value = "修改策略";
console.log('101111',dat) console.log('101111',dat)
var arr = [] addForm1.strategyCode=dat.strategyCode
for(let i in dat.deviceVos){ addForm1.strategyName=dat.strategyName
arr.push(dat.deviceVos[i].deviceId) addForm1.strategyInfo=dat.strategyInfo
} data.items1=dat.scenesList
data.checkedSblb1=arr console.log(data.items1)
for (let i = 0;i < data.sblb.length ;i++ ){ // var arr = []
var deviceId = data.sblb[i].deviceId // for(let i in dat.deviceVos){
for (let j = 0;j < dat.deviceVos.length ;j++ ) { // arr.push(dat.deviceVos[i].deviceId)
if ( deviceId === dat.deviceVos[j].deviceId){ // }
console.log(dat.deviceVos[j].tempValue) // data.checkedSblb1=arr
data.sblb[i].controlKey = dat.deviceVos[j].tempValue; // for (let i = 0;i < data.sblb.length ;i++ ){
} // var deviceId = data.sblb[i].deviceId
} // for (let j = 0;j < dat.deviceVos.length ;j++ ) {
} // if ( deviceId === dat.deviceVos[j].deviceId){
timingForm1.sceneName=dat.sceneName // console.log(dat.deviceVos[j].tempValue)
timingForm1.sceneRemark=dat.sceneRemark // data.sblb[i].controlKey = dat.deviceVos[j].tempValue;
timingForm1.sceneCode = dat.sceneCode // }
timingForm1.isJudge=dat.isJudge // }
timingForm1.judgeDevice=dat.judgeDevice // }
timingForm1.judgeElement=dat.judgeElement // timingForm1.sceneName=dat.sceneName
timingForm1.judgeData=dat.judgeData // timingForm1.sceneRemark=dat.sceneRemark
// timingForm1.sceneCode = dat.sceneCode
// timingForm1.isJudge=dat.isJudge
// timingForm1.judgeDevice=dat.judgeDevice
// timingForm1.judgeElement=dat.judgeElement
// timingForm1.judgeData=dat.judgeData
}; };
function submitForm1() { function submitForm1() {
let tempCheckedSblb = []; for(let i in data.items1){
data.checkedSblb1.forEach(item => { let tempCheckedSblb = [];
let tempItem = { data.items1[i].checkedSblb.forEach(item => {
deviceId: item, let tempItem = {
tempList:[] deviceId: item,
}; tempList:[]
// item data.sblb };
let deviceInfo = data.sblb.find(sblbItem => sblbItem.deviceId === item); // item data.sblb
if (deviceInfo) { let deviceInfo = data.items1[i].sblb.find(sblbItem => sblbItem.deviceId === item);
tempItem.tempList = deviceInfo.controlKey; if (deviceInfo) {
} tempItem.tempList = deviceInfo.controlKey
tempCheckedSblb.push(tempItem); }
timingForm1.deviceVos=tempCheckedSblb tempCheckedSblb.push(tempItem);
}); data.items1[i].deviceVos=tempCheckedSblb
console.log(timingForm1) });
postXg(timingForm1).then((res)=>{ }
console.log('??????????',data.items1)
addForm1.scenesList=data.items1
console.log(addForm1)
postXg(addForm1).then((res)=>{
console.log(res) console.log(res)
ElMessage({type:"success",message:'修改成功!'}) ElMessage({type:"success",message:'修改成功!'})
getXl().then((res)=>{ getXl().then((res)=>{
@ -551,48 +568,32 @@ function submitForm1() {
data.queryParams=res.data data.queryParams=res.data
}) })
handleQuery() handleQuery()
data.sblb.map(item => { open1.value = false;
item.controlKey.map(temp => { // data.sblb.map(item => {
temp.value = ''; // item.controlKey.map(temp => {
}); // temp.value = '';
}); // });
// });
}) })
open1.value = false;
timingForm1.sceneName=''
timingForm1.sceneRemark=''
timingForm1.sceneCode=''
timingForm1.deviceVos=[]
timingForm1.isJudge=2,
timingForm1.judgeDevice=null,
timingForm1.judgeElement=null,
timingForm1.judgeData=null
}; };
function cancel1() { function cancel1() {
open1.value = false; open1.value = false;
timingForm1.sceneName='' // handleQuery()
timingForm1.sceneRemark='' // data.sblb.map(item => {
timingForm1.sceneCode='' // item.controlKey.map(temp => {
timingForm1.deviceVos=[] // temp.value = '';
timingForm1.isJudge=2, // });
timingForm1.judgeDevice=null, // })
timingForm1.judgeElement=null,
timingForm1.judgeData=null
handleQuery()
data.sblb.map(item => {
item.controlKey.map(temp => {
temp.value = '';
});
})
}; };
function handleDel(sceneCode) { function handleDel(strategyCode) {
ElMessageBox.confirm("是否确认删除此策略?", "提示",{ ElMessageBox.confirm("是否确认删除此策略?", "提示",{
confirmButtonText: "确认", confirmButtonText: "确认",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
}).then(() => { }).then(() => {
console.log(sceneCode) console.log(strategyCode)
postDel({ postDel({
"sceneCode":sceneCode "strategyCode":strategyCode
}).then((res) => { }).then((res) => {
console.log(res) console.log(res)
ElMessage({type:"success",message:'删除成功!'}) ElMessage({type:"success",message:'删除成功!'})
@ -607,48 +608,79 @@ function handleDel(sceneCode) {
// //
const items = reactive([{ id: 1, title: '第1步', content: `步骤1的内容`,
isIndeterminate:false,
checkedSblb: [],
checkAll:false,
sceneName:'',
sceneRemark:'',
deviceVos:[],
isJudge:null,
judgeDevice:null,
judgeElement:null,
judgeData:null }])
const activeNames =reactive([1]) const activeNames =reactive([1])
const addStep = () => { const addStep = () => {
const newId = items.length + 1 getSb1().then((res)=>{
items.push({ id: newId, title: `${newId}`, content: `步骤${newId}的内容`, console.log('222',res)
isIndeterminate:false, var arr = []
checkedSblb: [], for(var i in res.data){
checkAll:false, arr=arr.concat(res.data[i].children)
sceneName:'', }
sceneRemark:'', console.log('sblb',arr)
deviceVos:[], data.sblb=arr
isJudge:null, const newId = data.items.length + 1
judgeDevice:null, data.items.push({ id: newId, title: `${newId}`, content: `步骤${newId}的内容`,
judgeElement:null, sblb:data.sblb,
judgeData:null}) isIndeterminate:false,
activeNames.push(`${newId}`) checkedSblb: [],
console.log(items) checkAll:false,
console.log(activeNames) sceneName:'',
sceneRemark:'',
deviceVos:[],
isJudge:null,
judgeDevice:null,
judgeElement:null,
judgeData:null})
activeNames.push(`${newId}`)
})
} }
const removeStep = (id) => { const removeStep = (id) => {
const index = items.findIndex(item => item.id === id) const index = data.items.findIndex(item => item.id === id)
if (index !== -1) { if (index !== -1) {
items.splice(index, 1) data.items.splice(index, 1)
activeNames.splice(activeNames.indexOf(`${id}`), 1) activeNames.splice(activeNames.indexOf(`${id}`), 1)
} }
console.log(items) console.log(data.items)
console.log(activeNames) console.log(activeNames)
} }
//
const activeNames1 =reactive([1])
const addStep1 = () => {
getSb1().then((res)=>{
console.log('222',res)
var arr = []
for(var i in res.data){
arr=arr.concat(res.data[i].children)
}
console.log('sblb',arr)
data.sblb=arr
const newId1 = data.items1.length + 1
data.items1.push({ id: newId1, title: `${newId1}`, content: `步骤${newId1}的内容`,
sblb:data.sblb,
isIndeterminate:false,
checkedSblb: [],
checkAll:false,
sceneName:'',
sceneRemark:'',
deviceVos:[],
isJudge:null,
judgeDevice:null,
judgeElement:null,
judgeData:null})
activeNames1.push(`${newId1}`)
})
}
const removeStep1 = (id) => {
const index = data.items1.findIndex(item => item.id === id)
if (index !== -1) {
data.items1.splice(index, 1)
activeNames1.splice(activeNames1.indexOf(`${id}`), 1)
}
console.log(data.items1)
console.log(activeNames1)
}
const { queryParams } = toRefs(data); const { queryParams } = toRefs(data);
</script> </script>

Loading…
Cancel
Save