修改样式
parent
e2100394db
commit
45051f4836
|
@ -6,6 +6,7 @@
|
|||
:before-close="closeDialog"
|
||||
>
|
||||
<el-form
|
||||
size="large"
|
||||
label-position="top"
|
||||
:model="addForm"
|
||||
label-width="150px"
|
||||
|
@ -152,8 +153,8 @@
|
|||
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="closeDialog">取消</el-button>
|
||||
<el-button type="primary" @click="saveData"> 保存 </el-button>
|
||||
<el-button size="large" @click="closeDialog">取消</el-button>
|
||||
<el-button size="large" type="primary" @click="saveData"> 保存 </el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
@ -207,7 +208,7 @@ export default {
|
|||
rules: {
|
||||
name: [
|
||||
{ required: true, message: "请输入通讯名称", trigger: "blur" },
|
||||
{ required: true, validator: validName, trigger: "blur" },
|
||||
// { required: true, validator: validName, trigger: "blur" },
|
||||
],
|
||||
description: [{ required: true, message: "请输入驱动描述", trigger: "blur" }],
|
||||
type: [{ required: true, message: "请选择通讯驱动", trigger: "blur" }]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<el-dialog v-model="visible" :title="type === 'I' ? '新增模板' : '编辑模板'" width="30%" :before-close="closeDialog">
|
||||
<el-form :model="addForm" label-width="100px" :rules="rules" ref="ruleFormRef">
|
||||
<el-form :model="addForm" label-width="100px" :rules="rules" ref="ruleFormRef" size="large">
|
||||
<el-form-item label="模板名称:" prop="name">
|
||||
<el-input v-model="addForm.name" placeholder="请输入模板名称" clearable :disabled="type !== 'I'" />
|
||||
</el-form-item>
|
||||
|
@ -16,8 +16,8 @@
|
|||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="closeDialog">取消</el-button>
|
||||
<el-button type="primary" @click="saveFormData"> 保存 </el-button>
|
||||
<el-button size="large" @click="closeDialog">取消</el-button>
|
||||
<el-button size="large" type="primary" @click="saveFormData"> 保存 </el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<el-dialog v-model="visible" title="点位管理" width="40%" :before-close="closeDialog">
|
||||
<el-form :model="addForm" label-width="100px" :rules="rules" ref="ruleFormRef">
|
||||
<el-form :model="addForm" label-width="100px" :rules="rules" ref="ruleFormRef" size="large">
|
||||
<el-form-item label="点位名称:" prop="name">
|
||||
<el-input v-model="addForm.name" placeholder="请输入点位名称" clearable :disabled="type !== 'I'" />
|
||||
</el-form-item>
|
||||
|
@ -34,8 +34,8 @@
|
|||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="closeDialog">取消</el-button>
|
||||
<el-button type="primary" @click="saveP"> 保存 </el-button>
|
||||
<el-button size="large" @click="closeDialog">取消</el-button>
|
||||
<el-button size="large" type="primary" @click="saveP"> 保存 </el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
:before-close="closeDialog"
|
||||
>
|
||||
<el-form
|
||||
size="large"
|
||||
label-position="top"
|
||||
:model="formData"
|
||||
label-width="150px"
|
||||
|
@ -55,8 +56,8 @@
|
|||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="closeDialog">取消</el-button>
|
||||
<el-button type="primary" @click="saveData"> 保存 </el-button>
|
||||
<el-button size="large" @click="closeDialog">取消</el-button>
|
||||
<el-button size="large" type="primary" @click="saveData"> 保存 </el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
:before-close="closeDialog"
|
||||
>
|
||||
<el-form
|
||||
size="large"
|
||||
:model="addForm"
|
||||
label-width="100px"
|
||||
:rules="rules"
|
||||
|
@ -29,8 +30,8 @@
|
|||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="closeDialog">取消</el-button>
|
||||
<el-button type="primary" @click="saveFormData"> 保存 </el-button>
|
||||
<el-button size="large" @click="closeDialog">取消</el-button>
|
||||
<el-button size="large" type="primary" @click="saveFormData"> 保存 </el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<el-dialog v-model="visible" title="设备管理" width="40%" :before-close="closeDialog">
|
||||
<el-form :model="addForm" label-width="100px" :rules="rules" ref="ruleFormRef">
|
||||
<el-form :model="addForm" label-width="100px" :rules="rules" ref="ruleFormRef" size="large">
|
||||
<el-form-item label="设备名称:" prop="name">
|
||||
<el-input v-model="addForm.name" placeholder="请输入设备名称" clearable :disabled="type!=='I'"/>
|
||||
</el-form-item>
|
||||
|
@ -20,8 +20,8 @@
|
|||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="closeDialog">取消</el-button>
|
||||
<el-button type="primary" @click="saveSet"> 保存 </el-button>
|
||||
<el-button size="large" @click="closeDialog">取消</el-button>
|
||||
<el-button size="large" type="primary" @click="saveSet"> 保存 </el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
:before-close="closeDialog"
|
||||
>
|
||||
<el-form
|
||||
size="large"
|
||||
:model="formData"
|
||||
label-width="150px"
|
||||
:rules="rules"
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="btns">
|
||||
<el-button type="primary" @click="resetCount">重置计数</el-button>
|
||||
<el-button type="primary" size="large" @click="resetCount">重置计数</el-button>
|
||||
<!-- <el-button @click="closeDialog">取消</el-button> -->
|
||||
</div>
|
||||
</fieldset>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<el-dialog v-model="visible" title="修改密码" width="35%" :before-close="closeDialog">
|
||||
<el-form label-position="top" :model="formData" label-width="150px" :rules="rules" ref="ruleFormRef">
|
||||
<el-form size="large" label-position="top" :model="formData" label-width="150px" :rules="rules" ref="ruleFormRef">
|
||||
<el-form-item label="原密码:" prop="oldPass">
|
||||
<el-input type="password" v-model="formData.oldPass" placeholder="请输入原密码" clearable />
|
||||
</el-form-item>
|
||||
|
@ -13,8 +13,8 @@
|
|||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="closeDialog">取消</el-button>
|
||||
<el-button type="primary" @click="saveData"> 保存 </el-button>
|
||||
<el-button size="large" @click="closeDialog">取消</el-button>
|
||||
<el-button size="large" type="primary" @click="saveData"> 保存 </el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
</div>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="closeDialog">取消</el-button>
|
||||
<el-button type="primary" @click="saveP"> 保存 </el-button>
|
||||
<el-button size="large" @click="closeDialog">取消</el-button>
|
||||
<el-button size="large" type="primary" @click="saveP"> 保存 </el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div style="background: rgb(2, 87, 2);color:#fff;">
|
||||
<div style="background: #2B5451;color:#fff;">
|
||||
<div class="header">
|
||||
<div class="left">
|
||||
<i v-if="hasBack" class="el-icon-back" @click="back"></i>
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
<legend class="box-ht">驱动名称</legend>
|
||||
<el-form label-width="130px">
|
||||
<el-form-item>
|
||||
{{ props.formData.name }}
|
||||
{{ formData.name }}
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</fieldset>
|
||||
<!-- 1 modbus_tcp -->
|
||||
<el-form :model="form" label-width="120px" :rules="rules" ref="ruleFormRef" v-if="pztypecode === 1">
|
||||
<el-form size="large" :model="form" label-width="120px" :rules="rules" ref="ruleFormRef" v-if="pztypecode === 1">
|
||||
<fieldset class="box2">
|
||||
<legend class="box-ht">通用配置</legend>
|
||||
<el-form-item label="轮询时间" prop="polling_time">
|
||||
|
@ -30,7 +30,7 @@
|
|||
</fieldset>
|
||||
</el-form>
|
||||
<!-- 2: 'modbus_rtu' -->
|
||||
<el-form :model="form2" label-width="120px" :rules="rules2" ref="ruleFormRef2" v-if="pztypecode === 2">
|
||||
<el-form size="large" :model="form2" label-width="120px" :rules="rules2" ref="ruleFormRef2" v-if="pztypecode === 2">
|
||||
<fieldset class="box2">
|
||||
<legend class="box-ht">通用配置</legend>
|
||||
<el-form-item label="轮询时间" prop="polling_time">
|
||||
|
@ -98,7 +98,7 @@
|
|||
</fieldset>
|
||||
</el-form> -->
|
||||
<div class="btns">
|
||||
<el-button type="primary" @click="onSubmit">保存</el-button>
|
||||
<el-button type="primary" size="large" @click="onSubmit">保存</el-button>
|
||||
</div>
|
||||
|
||||
</el-drawer>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<el-table :data="propertiesData" height="640" style="width: 100%" border stripe
|
||||
:header-cell-style="{ background: '#F6F7FC' }">
|
||||
:header-cell-style="{ background: '#F6F7FC' }" size="large">
|
||||
<el-table-column type="index" label="序号" width="80" align="center" />
|
||||
<el-table-column prop="name" label="点位名称" align="center" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
|
@ -45,12 +45,12 @@
|
|||
<span>{{ scope.row.permissions == 1 ? '只读' : '可写' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="180" show-overflow-tooltip>
|
||||
<el-table-column label="操作" align="center" width="200" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<el-button type="primary" @click="editData(scope.row)">
|
||||
<el-button size="large" @click="editData(scope.row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button type="danger" @click="delData(scope.row)">
|
||||
<el-button type="danger" size="large" @click="delData(scope.row)">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<span>设备数量:{{ propertiesData.length }}</span>
|
||||
</el-card>
|
||||
<div class="top-btn">
|
||||
<el-button type="primary" @click="manageData">
|
||||
<el-button type="primary" size="large" @click="manageData">
|
||||
新增设备
|
||||
</el-button>
|
||||
<!-- <div>
|
||||
|
@ -30,10 +30,10 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="180" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<el-button type="primary" @click="editData(scope.row)">
|
||||
<el-button type="primary" size="large" @click="editData(scope.row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button type="danger" @click="delData(scope.row)">
|
||||
<el-button type="danger" size="large" @click="delData(scope.row)">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
|
|
|
@ -46,6 +46,9 @@ s {
|
|||
border: 0 !important;
|
||||
background: #00AAA3 !important;
|
||||
}
|
||||
.el-table--large .el-table__cell {
|
||||
padding: 14px 0;
|
||||
}
|
||||
.mb {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
@ -62,6 +65,7 @@ s {
|
|||
margin-top: 5px;
|
||||
}
|
||||
.btns {
|
||||
margin-top: 15px;
|
||||
text-align: center;
|
||||
}
|
||||
.el-drawer {
|
||||
|
@ -140,7 +144,7 @@ s {
|
|||
}
|
||||
.turn {
|
||||
background: rgba(15, 179, 251, 0.2);
|
||||
color: rgb(2, 87, 2) !important;
|
||||
color: #2B5451 !important;
|
||||
animation: turn 1s linear infinite;
|
||||
}
|
||||
@keyframes turn {
|
||||
|
@ -242,7 +246,7 @@ s {
|
|||
text-align: center;
|
||||
}
|
||||
.green {
|
||||
background: #2b545158 !important;
|
||||
background: #04968a !important;
|
||||
color: #000000;
|
||||
}
|
||||
.red {
|
||||
|
|
|
@ -35,8 +35,9 @@ axios.interceptors.response.use(
|
|||
}
|
||||
}
|
||||
}
|
||||
console.log(123,res);
|
||||
if(!res.request || res.request.responseType === 'blob') { // 特殊情况处理,导出文件
|
||||
return res;
|
||||
return Promise.resolve(res);
|
||||
}
|
||||
// token过期
|
||||
if (res.data.code === 3004) {
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
<div class="all-content">
|
||||
<div class="time-div">
|
||||
<span>2023年08月23日 星期三 09:57:11</span>
|
||||
<el-button type="primary" @click="getTime">时间校对</el-button>
|
||||
<el-button type="primary" @click="getTime">时间校对</el-button>
|
||||
<el-button type="primary" size="large" @click="getTime">时间校对</el-button>
|
||||
<el-button type="primary" size="large" @click="getTime">时间校对</el-button>
|
||||
|
||||
</div>
|
||||
<div class="top-div">
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
<el-card class="content-div">
|
||||
<div class="all-content">
|
||||
<div class="top-div">
|
||||
<el-button type="primary" @click="addData">新增</el-button>
|
||||
<el-button type="primary" size="large" @click="addData">新增</el-button>
|
||||
</div>
|
||||
<el-table :data="tableData" height="760" style="width: 100%" border stripe
|
||||
:header-cell-style="{ background: '#F6F7FC' }">
|
||||
:header-cell-style="{ background: '#F6F7FC' }" size="large">
|
||||
<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="type" label="模板类型" width="240" align="center" show-overflow-tooltip>
|
||||
|
@ -14,16 +14,16 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="point_count" label="点位数量" width="240" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="description" label="模板描述" width="600" align="center" show-overflow-tooltip />
|
||||
<el-table-column label="模板管理" align="center" show-overflow-tooltip>
|
||||
<el-table-column prop="description" label="模板描述" align="center" show-overflow-tooltip />
|
||||
<el-table-column label="模板管理" align="center" show-overflow-tooltip width="300">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" @click="viewData(scope.row)">
|
||||
<el-button type="primary" size="large" @click="viewData(scope.row)">
|
||||
点位
|
||||
</el-button>
|
||||
<el-button type="primary" @click="editData(scope.row)">
|
||||
<el-button size="large" @click="editData(scope.row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button type="danger" @click="delData(scope.row)">
|
||||
<el-button type="danger" size="large" @click="delData(scope.row)">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
<el-card class="content-div">
|
||||
<div class="all-content">
|
||||
<div class="top-div">
|
||||
<el-button type="primary" @click="addData">新增</el-button>
|
||||
<el-button type="primary" size="large" @click="addData">新增</el-button>
|
||||
</div>
|
||||
<el-table :data="tableData" height="760" border :row-class-name="tableRowClassName"
|
||||
:header-cell-style="{ background: '#F6F7FC' }">
|
||||
:header-cell-style="{ background: '#F6F7FC' }" size="large">
|
||||
<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="description" label="通讯描述" width="200" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="drive" label="通讯驱动" width="200" align="center" show-overflow-tooltip>
|
||||
<el-table-column prop="description" label="通讯描述" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="drive" label="驱动类型" width="200" align="center" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<span>{{ qudongOptions[scope.row.type] }}</span>
|
||||
</template>
|
||||
|
@ -20,36 +20,36 @@
|
|||
<span> {{ txStatus[scope.row.status] }} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="enable" label="启停控制" width="350" align="center">
|
||||
<el-table-column prop="enable" label="启停控制" width="200" align="center">
|
||||
<template #default="scope">
|
||||
<!-- 现在是 <el-tag :class="!scope.row.enable? 'stop':'start'">{{!scope.row.enable? '停用状态' : '启用状态'}} </el-tag> 您可以点击 -->
|
||||
<el-button type="primary" size="mini" @click="changeStatus(scope.row)" v-if="!scope.row.enable">
|
||||
<el-button type="primary" size="large" @click="changeStatus(scope.row)" v-if="!scope.row.enable">
|
||||
启用
|
||||
</el-button>
|
||||
<el-button size="mini" @click="changeStatus(scope.row)" v-else>
|
||||
<el-button size="large" @click="changeStatus(scope.row)" v-else>
|
||||
停用
|
||||
</el-button>
|
||||
<!-- <el-switch v-model="scope.row.enable" inline-prompt active-text="启用" inactive-text="停用" :active-value="true"
|
||||
:inactive-value="false" active-color="#13ce66" inactive-color="#ddd" @change="changeStatus(scope.row)" /> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" show-overflow-tooltip>
|
||||
<el-table-column label="操作" align="center" show-overflow-tooltip width="450">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" @click="openDetails(scope.row)">
|
||||
<el-button type="success" size="large" @click="openDetails(scope.row)">
|
||||
详情
|
||||
</el-button>
|
||||
<el-button type="primary" @click="openPz(scope.row)">
|
||||
<el-button type="warning" size="large" @click="openPz(scope.row)">
|
||||
配置
|
||||
</el-button>
|
||||
<el-button type="primary" @click="editData(scope.row)">
|
||||
<el-button size="large" @click="editData(scope.row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button type="danger" @click="delData(scope.row)">
|
||||
<el-button type="danger" size="large" @click="delData(scope.row)">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button type="primary" @click="viewData(scope.row)">
|
||||
<!-- <el-button type="primary" size="large" @click="viewData(scope.row)">
|
||||
设备
|
||||
</el-button>
|
||||
</el-button> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -211,6 +211,11 @@ export default {
|
|||
};
|
||||
|
||||
const delData = (item) => {
|
||||
if(item.status == 2) {
|
||||
ElMessage.warning("无法删除正在运行的驱动,请先手动停止后再删除");
|
||||
return;
|
||||
|
||||
}
|
||||
ElMessageBox.confirm("确定删除该数据?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
|
@ -218,7 +223,7 @@ export default {
|
|||
})
|
||||
.then(async () => {
|
||||
let param = {
|
||||
name: state.formData.name
|
||||
name: item.name
|
||||
}
|
||||
const res = await infoApi.delTx(param);
|
||||
if (res.code == 0) {
|
||||
|
@ -268,20 +273,9 @@ export default {
|
|||
|
||||
}
|
||||
|
||||
const getTextColor = (type) => {
|
||||
if(type == 1) {
|
||||
return ''
|
||||
}
|
||||
if(type == 2) {
|
||||
return 'green'
|
||||
}
|
||||
if(type == 3) {
|
||||
return 'red'
|
||||
}
|
||||
}
|
||||
const tableRowClassName = ({ row, rowIndex }) => {
|
||||
if(row.status == 1) {
|
||||
return 'green'
|
||||
return ''
|
||||
}
|
||||
if(row.status == 2) {
|
||||
return 'green'
|
||||
|
@ -310,7 +304,6 @@ export default {
|
|||
openPz,
|
||||
openDetails,
|
||||
viewData,
|
||||
getTextColor,
|
||||
tableRowClassName
|
||||
};
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue