Compare commits
2 Commits
37b851f3a2
...
60261c9aac
Author | SHA1 | Date |
---|---|---|
wangqiujuan0808 | 60261c9aac | |
wangqiujuan0808 | d3c8b6d480 |
|
@ -344,7 +344,9 @@ export default {
|
||||||
}
|
}
|
||||||
const res = await infoApi.getCom(parm);
|
const res = await infoApi.getCom(parm);
|
||||||
if (res.code == 0) {
|
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;
|
state.form2.com_name = state.comArr[0].name;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -63,13 +63,13 @@ export default {
|
||||||
iconName: 'Management',
|
iconName: 'Management',
|
||||||
children: [],
|
children: [],
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
id: 2,
|
// id: 2,
|
||||||
name: "规则引擎",
|
// name: "规则引擎",
|
||||||
index: "/rules",
|
// index: "/rules",
|
||||||
iconName: 'Management',
|
// iconName: 'Management',
|
||||||
children: [],
|
// children: [],
|
||||||
},
|
// },
|
||||||
// {
|
// {
|
||||||
// id: 4,
|
// id: 4,
|
||||||
// name: "透传管理",
|
// name: "透传管理",
|
||||||
|
@ -98,11 +98,11 @@ export default {
|
||||||
// name: "实时数据",
|
// name: "实时数据",
|
||||||
// index: "/data",
|
// index: "/data",
|
||||||
// },
|
// },
|
||||||
{
|
// {
|
||||||
id: 3 - 3,
|
// id: 3 - 3,
|
||||||
name: "上报管理",
|
// name: "上报管理",
|
||||||
index: "/report",
|
// index: "/report",
|
||||||
},
|
// },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<div class="top-div">
|
<div class="top-div">
|
||||||
<el-button type="primary" @click="addData">新增</el-button>
|
<el-button type="primary" @click="addData">新增</el-button>
|
||||||
</div>
|
</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' }">
|
:header-cell-style="{ background: '#F6F7FC' }">
|
||||||
<el-table-column type="index" label="序号" width="80" align="center" />
|
<el-table-column type="index" label="序号" width="80" align="center" />
|
||||||
<el-table-column prop="name" label="模板名称" width="240" align="center" show-overflow-tooltip />
|
<el-table-column prop="name" label="模板名称" width="240" align="center" show-overflow-tooltip />
|
||||||
|
@ -85,7 +85,9 @@ export default {
|
||||||
const res = await infoApi.getMb();
|
const res = await infoApi.getMb();
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
// 获取数据
|
// 获取数据
|
||||||
state.tableData = res.data;
|
state.tableData = res.data.sort((a,b) => {
|
||||||
|
return (a.name > b.name ? 1 : -1)
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<div class="top-div">
|
<div class="top-div">
|
||||||
<el-button type="primary" @click="addData">新增</el-button>
|
<el-button type="primary" @click="addData">新增</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-table :data="tableData" height="400" border stripe
|
<el-table :data="tableData" height="760" border stripe
|
||||||
:header-cell-style="{ background: '#F6F7FC' }">
|
:header-cell-style="{ background: '#F6F7FC' }">
|
||||||
<el-table-column type="index" label="序号" width="80" align="center" />
|
<el-table-column type="index" label="序号" width="80" align="center" />
|
||||||
<el-table-column prop="name" label="通讯名称" width="200" align="center" show-overflow-tooltip />
|
<el-table-column prop="name" label="通讯名称" width="200" align="center" show-overflow-tooltip />
|
||||||
|
@ -14,16 +14,9 @@
|
||||||
<span>{{ qudongOptions[scope.row.type] }}</span>
|
<span>{{ qudongOptions[scope.row.type] }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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">
|
<el-table-column prop="status" label="通讯状态" width="200" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span> {{ txStatus[scope.row.status] }} </span>
|
<span :style="{'color': getTextColor(scope.row.status)}"> {{ txStatus[scope.row.status] }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="enable" label="启用状态" width="350" align="center">
|
<el-table-column prop="enable" label="启用状态" width="350" align="center">
|
||||||
|
@ -159,7 +152,9 @@ export default {
|
||||||
}
|
}
|
||||||
const res = await infoApi.getTx(param);
|
const res = await infoApi.getTx(param);
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
state.tableData = res.data;
|
state.tableData = res.data.sort((a,b) => {
|
||||||
|
return (a.name > b.name ? 1 : -1)
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const dialogClose = () => {
|
const dialogClose = () => {
|
||||||
|
@ -271,6 +266,18 @@ export default {
|
||||||
state.dialogVisible4 = true;
|
state.dialogVisible4 = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const getTextColor = (type) => {
|
||||||
|
if(type == 1) {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
if(type == 2) {
|
||||||
|
return 'green'
|
||||||
|
}
|
||||||
|
if(type == 3) {
|
||||||
|
return 'red'
|
||||||
|
}
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
...toRefs(state),
|
...toRefs(state),
|
||||||
addData,
|
addData,
|
||||||
|
@ -288,7 +295,8 @@ export default {
|
||||||
dialogSuccess4,
|
dialogSuccess4,
|
||||||
openPz,
|
openPz,
|
||||||
openDetails,
|
openDetails,
|
||||||
viewData
|
viewData,
|
||||||
|
getTextColor
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue