Commit 9555f4f0 authored by AiNoeLiYa's avatar AiNoeLiYa

1.格式优化

Signed-off-by: 's avatarAiNoeLiYa <jzbcxy@gmail.com>
parent 196af2ec
......@@ -13,10 +13,10 @@
style="width: 150px"
@change="handleQuery"
>
<el-option label="所有" value="all"></el-option>
<el-option label="驳回" value="rejected"></el-option>
<el-option label="待审核" value="pending"></el-option>
<el-option label="通过" value="approved"></el-option>
<el-option label="所有" value="all" />
<el-option label="驳回" value="rejected" />
<el-option label="待审核" value="pending" />
<el-option label="通过" value="approved" />
</el-select>
</el-form-item>
<el-form-item>
......@@ -316,20 +316,20 @@ export default {
this.loading = false
},
handleReject() {
this.$message({
message: '操作完成',
type: 'warning'
});
this.openDetails = false
this.reset()
},
handleApprove(){
this.$message({
message: '操作完成',
type: 'success'
});
this.openDetails = false
this.reset()
message: '操作完成',
type: 'warning'
})
this.openDetails = false
this.reset()
},
handleApprove() {
this.$message({
message: '操作完成',
type: 'success'
})
this.openDetails = false
this.reset()
},
// 取消按钮
cancel() {
......
......@@ -85,50 +85,50 @@
<div style="padding:10px">
<div class="mb12 font-small-bold">设备受入列表</div>
<!-- <el-table v-loading="loading" border :data="list" @selection-change="handleSelectionChange"> -->
<!-- <el-table-column type="selection" width="55" align="center" />-->
<!-- &lt;!&ndash; <el-table-column type="index" label="序号" width="50" />&ndash;&gt;-->
<!-- <el-table-column label="访问编号" width="100" align="center" prop="infoId" show-overflow-tooltip>-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.infoId || '-' }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="用户名称" align="center" prop="userName" show-overflow-tooltip>-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.userName || '-' }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="登录地址" align="center" prop="ipaddr" show-overflow-tooltip>-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.ipaddr || '-' }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="操作信息" align="center" prop="msg" show-overflow-tooltip>-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.msg || '-' }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- &lt;!&ndash; <el-table-column label="登录地址" align="center" prop="ipaddr" width="130" :show-overflow-tooltip="true" />&ndash;&gt;-->
<!-- <el-table-column label="登录地点" align="center" prop="loginLocation" :show-overflow-tooltip="true" />-->
<!-- &lt;!&ndash; <el-table-column label="浏览器" align="center" prop="browser" show-overflow-tooltip>&ndash;&gt;-->
<!-- &lt;!&ndash; <template slot-scope="scope">&ndash;&gt;-->
<!-- &lt;!&ndash; {{ scope.row.browser || '-' }}&ndash;&gt;-->
<!-- &lt;!&ndash; </template>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-table-column>&ndash;&gt;-->
<!-- &lt;!&ndash; <el-table-column label="操作系统" align="center" prop="os" show-overflow-tooltip>&ndash;&gt;-->
<!-- &lt;!&ndash; <template slot-scope="scope">&ndash;&gt;-->
<!-- &lt;!&ndash; {{ scope.row.os || '-' }}&ndash;&gt;-->
<!-- &lt;!&ndash; </template>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-table-column>&ndash;&gt;-->
<!-- <el-table-column label="登录状态" align="center" prop="status" :formatter="statusFormat" />-->
<!-- <el-table-column type="index" width="55" label="序号" align="center" />
<!-- <el-table-column type="selection" width="55" align="center" />-->
<!-- &lt;!&ndash; <el-table-column type="index" label="序号" width="50" />&ndash;&gt;-->
<!-- <el-table-column label="访问编号" width="100" align="center" prop="infoId" show-overflow-tooltip>-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.infoId || '-' }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="用户名称" align="center" prop="userName" show-overflow-tooltip>-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.userName || '-' }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="登录地址" align="center" prop="ipaddr" show-overflow-tooltip>-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.ipaddr || '-' }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="操作信息" align="center" prop="msg" show-overflow-tooltip>-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.msg || '-' }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- &lt;!&ndash; <el-table-column label="登录地址" align="center" prop="ipaddr" width="130" :show-overflow-tooltip="true" />&ndash;&gt;-->
<!-- <el-table-column label="登录地点" align="center" prop="loginLocation" :show-overflow-tooltip="true" />-->
<!-- &lt;!&ndash; <el-table-column label="浏览器" align="center" prop="browser" show-overflow-tooltip>&ndash;&gt;-->
<!-- &lt;!&ndash; <template slot-scope="scope">&ndash;&gt;-->
<!-- &lt;!&ndash; {{ scope.row.browser || '-' }}&ndash;&gt;-->
<!-- &lt;!&ndash; </template>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-table-column>&ndash;&gt;-->
<!-- &lt;!&ndash; <el-table-column label="操作系统" align="center" prop="os" show-overflow-tooltip>&ndash;&gt;-->
<!-- &lt;!&ndash; <template slot-scope="scope">&ndash;&gt;-->
<!-- &lt;!&ndash; {{ scope.row.os || '-' }}&ndash;&gt;-->
<!-- &lt;!&ndash; </template>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-table-column>&ndash;&gt;-->
<!-- <el-table-column label="登录状态" align="center" prop="status" :formatter="statusFormat" />-->
<!-- <el-table-column type="index" width="55" label="序号" align="center" />
<el-table-column label="访问编号" align="center" prop="businessId" />-->
<!-- <el-table-column label="设备名称" align="center" prop="username" />
<!-- <el-table-column label="设备名称" align="center" prop="username" />
<el-table-column label="XXXX" align="center" prop="ipaddr" width="130" :show-overflow-tooltip="true" />
<el-table-column label="XXXX" align="center" prop="loginLocation" :show-overflow-tooltip="true" /> -->
<!-- <el-table-column label="浏览器" align="center" prop="browser" />
<!-- <el-table-column label="浏览器" align="center" prop="browser" />
<el-table-column label="操作系统" align="center" prop="os" />-->
<!-- <el-table-column label="登录状态" align="center" prop="status" :formatter="statusFormat" />-->
<!-- <el-table-column label="XXXX" align="center" prop="status">
<!-- <el-table-column label="登录状态" align="center" prop="status" :formatter="statusFormat" />-->
<!-- <el-table-column label="XXXX" align="center" prop="status">
<template slot-scope="scope">
<span v-if="scope.row.status === '0'">失败</span>
<span v-if="scope.row.status === '1'">成功</span>
......@@ -259,10 +259,10 @@
</template>
<script>
import { list, delLogininfo, cleanLogininfo, exportLogininfo } from '@/api/monitor/loginInfo'
import dictCons from '@/utils/dictCons'
import {cleanLogininfo, delLogininfo, exportLogininfo, list} from '@/api/monitor/loginInfo'
import Template from '@/views/instance/Template'
import Coolbutton from '@/components/coolbutton'
export default {
name: 'LoginInfo',
components: { Template, Coolbutton },
......
......@@ -79,7 +79,7 @@
<el-table-column label="操作" class-name="small-padding fixed-width" width="140px">
<template slot-scope="scope">
<el-button v-if="scope.row.state !== ' '" align="center" type="typeParent" :size="size" @click="handleUpdate(scope.row)">
<el-button v-if="scope.row.state !== ' '" align="center" type="typeParent" :size="size" @click="handleUpdate(scope.row)">
{{ updataName }}
</el-button>
......@@ -90,8 +90,8 @@
<el-pagination
background
layout="prev, pager, next"
:total="1000">
</el-pagination>
:total="1000"
/>
<!-- TODO: 添加或修改设备配置对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
......@@ -157,6 +157,7 @@
<script>
// TODO: 导入外部已经封装好的button组件
import Coolbutton from '@/components/coolbutton'
export default {
name: 'Role',
components: { Coolbutton },
......@@ -168,7 +169,7 @@ export default {
nameParent: '删除',
resetName: '重置',
addName: '新增',
application:'申请领用',
application: '申请领用',
updataName: '修改',
size: 'mini',
smallSize: 'small',
......@@ -220,9 +221,9 @@ export default {
deviceName: '',
deviceId: '',
LOT: '',
location:'',
ply:'',
state:'',
location: '',
ply: '',
state: '',
flag: '1',
remark: '',
createTime: new Date(),
......@@ -234,10 +235,10 @@ export default {
deviceName: '',
deviceId: '',
LOT: '',
location:'',
ply:'',
state:'',
state:'',
location: '',
ply: '',
state: '',
state: '',
flag: '1',
createTime: new Date(),
updataTime: new Date(),
......@@ -248,9 +249,9 @@ export default {
deviceName: '',
deviceId: '',
LOT: '',
location:'',
ply:'',
state:'',
location: '',
ply: '',
state: '',
flag: '1',
createTime: new Date(),
updataTime: new Date(),
......@@ -258,28 +259,28 @@ export default {
},
// TODO: 模拟测试数据
simulateDeviceList: [{
deviceName: '设备1', deviceId: '0001', flag: 1, LOT: '0001', location:'XXX', ply:'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin',state:'驳回',
deviceName: '设备1', deviceId: '0001', flag: 1, LOT: '0001', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '驳回'
}, {
deviceName: '设备2', deviceId: '0002', flag: 2, LOT: '0002', location:'XXX', ply:'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin' ,state:'驳回',
},{
deviceName: '设备3', deviceId: '0003', flag: 2, LOT: '0003', location:'XXX', ply:'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin' ,state:'驳回',
},{
deviceName: '设备4', deviceId: '0004', flag: 2, LOT: '0004', location:'XXX', ply:'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin' ,state:'驳回',
},{
deviceName: '设备5', deviceId: '0005', flag: 2, LOT: '0005', location:'XXX', ply:'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin' ,state:'待审核',
},{
deviceName: '设备6', deviceId: '0006', flag: 2, LOT: '0006', location:'XXX', ply:'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin' ,state:'待审核',
},{
deviceName: '设备7', deviceId: '0007', flag: 2, LOT: '0007', location:'XXX', ply:'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin' ,state:'待审核',
},{
deviceName: '设备8', deviceId: '0008', flag: 2, LOT: '0008', location:'XXX', ply:'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin' ,state:'待审核',
},{
deviceName: '设备9', deviceId: '0009', flag: 2, LOT: '0009', location:'XXX', ply:'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin' ,state:'通过',
},{
deviceName: '设备10', deviceId: '00010', flag: 2, LOT: '0010', location:'XXX', ply:'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin' ,state:'通过',
},
deviceName: '设备2', deviceId: '0002', flag: 2, LOT: '0002', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '驳回'
}, {
deviceName: '设备3', deviceId: '0003', flag: 2, LOT: '0003', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '驳回'
}, {
deviceName: '设备4', deviceId: '0004', flag: 2, LOT: '0004', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '驳回'
}, {
deviceName: '设备5', deviceId: '0005', flag: 2, LOT: '0005', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '待审核'
}, {
deviceName: '设备6', deviceId: '0006', flag: 2, LOT: '0006', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '待审核'
}, {
deviceName: '设备7', deviceId: '0007', flag: 2, LOT: '0007', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '待审核'
}, {
deviceName: '设备8', deviceId: '0008', flag: 2, LOT: '0008', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '待审核'
}, {
deviceName: '设备9', deviceId: '0009', flag: 2, LOT: '0009', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '通过'
}, {
deviceName: '设备10', deviceId: '00010', flag: 2, LOT: '0010', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '通过'
}
],
],
// 表单校验
rules: {
......@@ -336,9 +337,9 @@ export default {
this.form = {
deviceName: '',
deviceId: '',
location:'',
ply:'',
state:'',
location: '',
ply: '',
state: '',
flag: '1',
createTime: new Date(),
updataTime: new Date(),
......
......@@ -2,16 +2,35 @@
<div class="app-container">
<el-form ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true">
<el-form-item label="设备名称" prop="roleName">
<el-input v-model="queryParams.roleName" placeholder="请输入设备名称" clearable :maxlength="30" size="small"
style="width: 150px" @keyup.enter.native="handleQuery" />
<el-input
v-model="queryParams.roleName"
placeholder="请输入设备名称"
clearable
:maxlength="30"
size="small"
style="width: 150px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="设备编码" prop="roleKey">
<el-input v-model="queryParams.roleKey" placeholder="请输入设备编码" clearable size="small" style="width: 150px"
@keyup.enter.native="handleQuery" />
<el-input
v-model="queryParams.roleKey"
placeholder="请输入设备编码"
clearable
size="small"
style="width: 150px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="lot" prop="roleKey">
<el-input v-model="queryParams.roleKey" placeholder="请输入设备lot" clearable size="small" style="width: 150px"
@keyup.enter.native="handleQuery" />
<el-input
v-model="queryParams.roleKey"
placeholder="请输入设备lot"
clearable
size="small"
style="width: 150px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" icon="el-icon-search" @click="handleQuery">查询</el-button>
......@@ -20,18 +39,18 @@
<el-form-item />
</div>
</el-form>
<div class="placeholder"></div>
<div class="placeholder" />
<div class="Role" style="width: 100%; height: 600px; display: flex; padding-left: 100px">
<!--左边两个图-->
<div class="left-charts" style="width: 50%; display: flex; flex-direction: column;">
<div id="myChart1" style="flex: 1; margin-bottom: 100px;"></div>
<div id="myChart2" style="flex: 1;"></div>
<div id="myChart1" style="flex: 1; margin-bottom: 100px;" />
<div id="myChart2" style="flex: 1;" />
</div>
<!--右边两个图-->
<div class="right-charts" style="width: 50%; display: flex; flex-direction: column;">
<div id="myChart5" style="flex: 1; margin-bottom: 60px;"></div>
<div id="myChart3" style="flex: 1;"></div>
<div id="myChart5" style="flex: 1; margin-bottom: 60px;" />
<div id="myChart3" style="flex: 1;" />
</div>
</div>
</div>
......@@ -39,17 +58,17 @@
<script>
import {
listRole,
getRole,
delRole,
addRole,
updateRole,
exportRole,
changeRoleStatus,
dataScope,
changeRoleStatus
delRole,
exportRole,
getRole,
listRole,
updateRole
} from '@/api/system/role'
import { roleMenuTreeselectMC, treeselect as menuTreeselect, roleMenuTreeselect } from '@/api/system/menu'
import { treeselect as deptTreeselect, roleDeptTreeselect } from '@/api/system/dept'
import {roleMenuTreeselect, roleMenuTreeselectMC, treeselect as menuTreeselect} from '@/api/system/menu'
import {roleDeptTreeselect, treeselect as deptTreeselect} from '@/api/system/dept'
// import { getRolesByInsId } from '../../../api/businessManage/template'
import * as echarts from 'echarts'
......@@ -186,8 +205,8 @@ export default {
deptOptions: []
}
},
mounted: function () {
this.$nextTick(function () {
mounted: function() {
this.$nextTick(function() {
this.drawLine5('myChart5')
})
......@@ -328,7 +347,7 @@ export default {
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
},
color: function (params) {
color: function(params) {
// 自定义颜色
var colorList = ['red', '#16deb6', '#b24999']
return colorList[params.dataIndex]
......@@ -393,7 +412,7 @@ export default {
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
},
color: function (params) {
color: function(params) {
// 自定义颜色
var colorList = ['red', '#7fdcca']
return colorList[params.dataIndex]
......@@ -518,14 +537,14 @@ export default {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(function () {
}).then(function() {
return changeRoleStatus(row.businessId, row.flag)
}).then(() => {
this.$message({
message: text + '成功',
type: 'success'
})
}).catch(function () {
}).catch(function() {
row.flag = row.flag === '0' ? '1' : '0'
})
},
......@@ -662,7 +681,7 @@ export default {
this.title = '分配数据权限'
},
/** 提交按钮 */
submitForm: function () {
submitForm: function() {
this.$refs['form'].validate(valid => {
if (valid) {
this.form.menuCheckStrictly = false
......@@ -685,7 +704,7 @@ export default {
})
},
/** 提交按钮(数据权限) */
submitDataScope: function () {
submitDataScope: function() {
if (this.form.businessId !== undefined && this.form.menuId !== undefined) {
this.form.deptIds = this.getDeptAllCheckedKeys()
dataScope(this.form).then(response => {
......@@ -702,7 +721,7 @@ export default {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(function () {
}).then(function() {
return delRole(roleIds)
}).then(() => {
this.getList()
......@@ -710,7 +729,7 @@ export default {
message: '删除成功',
type: 'success'
})
}).catch(function () {
}).catch(function() {
})
},
/** 导出按钮操作 */
......@@ -720,7 +739,7 @@ export default {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(function () {
}).then(function() {
return exportRole(queryParams).then(response => {
const blob = new Blob([response])
const downloadElement = document.createElement('a')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment