main
wangqiujuan0808 2024-06-25 16:40:20 +08:00
parent 3d13889e81
commit d3c8b6d480
5 changed files with 39 additions and 27 deletions

View File

@ -111,7 +111,7 @@ const infoApi = {
},
//
getTxStatus(params) {
return postPBRequest(`/driver`, params, 54004);
return postPBRequest(`/driver`, params, 54002);
},
//

View File

@ -344,7 +344,9 @@ export default {
}
const res = await infoApi.getCom(parm);
if (res.code == 0) {
state.comArr = res.data;
state.comArr = res.data.sort((a,b) => {
return (a.name > b.name ? 1 : -1)
});
state.form2.com_name = state.comArr[0].name;
}
};

View File

@ -63,13 +63,13 @@ export default {
iconName: 'Management',
children: [],
},
{
id: 2,
name: "规则引擎",
index: "/rules",
iconName: 'Management',
children: [],
},
// {
// id: 2,
// name: "",
// index: "/rules",
// iconName: 'Management',
// children: [],
// },
// {
// id: 4,
// name: "",
@ -98,11 +98,11 @@ export default {
// name: "",
// index: "/data",
// },
{
id: 3 - 3,
name: "上报管理",
index: "/report",
},
// {
// id: 3 - 3,
// name: "",
// index: "/report",
// },
],
},
],

View File

@ -4,7 +4,7 @@
<div class="top-div">
<el-button type="primary" @click="addData"></el-button>
</div>
<el-table :data="tableData" height="730" style="width: 100%" border stripe
<el-table :data="tableData" height="760" style="width: 100%" border stripe
:header-cell-style="{ background: '#F6F7FC' }">
<el-table-column type="index" label="序号" width="80" align="center" />
<el-table-column prop="name" label="模板名称" width="240" align="center" show-overflow-tooltip />
@ -85,7 +85,9 @@ export default {
const res = await infoApi.getMb();
if (res.code == 0) {
//
state.tableData = res.data;
state.tableData = res.data.sort((a,b) => {
return (a.name > b.name ? 1 : -1)
});
} else {
}
};

View File

@ -4,7 +4,7 @@
<div class="top-div">
<el-button type="primary" @click="addData"></el-button>
</div>
<el-table :data="tableData" height="400" border stripe
<el-table :data="tableData" height="760" border stripe
:header-cell-style="{ background: '#F6F7FC' }">
<el-table-column type="index" label="序号" width="80" align="center" />
<el-table-column prop="name" label="通讯名称" width="200" align="center" show-overflow-tooltip />
@ -14,16 +14,9 @@
<span>{{ qudongOptions[scope.row.type] }}</span>
</template>
</el-table-column>
<!-- <el-table-column
prop="host"
label="主机地址"
width="200"
align="center"
show-overflow-tooltip
/> -->
<el-table-column prop="status" label="通讯状态" width="200" align="center">
<template #default="scope">
<span> {{ txStatus[scope.row.status] }} </span>
<span :style="{'color': getTextColor(scope.row.status)}"> {{ txStatus[scope.row.status] }} </span>
</template>
</el-table-column>
<el-table-column prop="enable" label="启用状态" width="350" align="center">
@ -159,7 +152,9 @@ export default {
}
const res = await infoApi.getTx(param);
if (res.code == 0) {
state.tableData = res.data;
state.tableData = res.data.sort((a,b) => {
return (a.name > b.name ? 1 : -1)
});
}
};
const dialogClose = () => {
@ -271,6 +266,18 @@ export default {
state.dialogVisible4 = true;
}
const getTextColor = (type) => {
if(type == 1) {
return ''
}
if(type == 2) {
return 'green'
}
if(type == 3) {
return 'red'
}
}
return {
...toRefs(state),
addData,
@ -288,7 +295,8 @@ export default {
dialogSuccess4,
openPz,
openDetails,
viewData
viewData,
getTextColor
};
},
};