Commit 9555f4f0 authored by AiNoeLiYa's avatar AiNoeLiYa

1.格式优化

Signed-off-by: 's avatarAiNoeLiYa <jzbcxy@gmail.com>
parent 196af2ec
...@@ -13,10 +13,10 @@ ...@@ -13,10 +13,10 @@
style="width: 150px" style="width: 150px"
@change="handleQuery" @change="handleQuery"
> >
<el-option label="所有" value="all"></el-option> <el-option label="所有" value="all" />
<el-option label="驳回" value="rejected"></el-option> <el-option label="驳回" value="rejected" />
<el-option label="待审核" value="pending"></el-option> <el-option label="待审核" value="pending" />
<el-option label="通过" value="approved"></el-option> <el-option label="通过" value="approved" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
...@@ -319,15 +319,15 @@ export default { ...@@ -319,15 +319,15 @@ export default {
this.$message({ this.$message({
message: '操作完成', message: '操作完成',
type: 'warning' type: 'warning'
}); })
this.openDetails = false this.openDetails = false
this.reset() this.reset()
}, },
handleApprove(){ handleApprove() {
this.$message({ this.$message({
message: '操作完成', message: '操作完成',
type: 'success' type: 'success'
}); })
this.openDetails = false this.openDetails = false
this.reset() this.reset()
}, },
......
...@@ -259,10 +259,10 @@ ...@@ -259,10 +259,10 @@
</template> </template>
<script> <script>
import { list, delLogininfo, cleanLogininfo, exportLogininfo } from '@/api/monitor/loginInfo' import {cleanLogininfo, delLogininfo, exportLogininfo, list} from '@/api/monitor/loginInfo'
import dictCons from '@/utils/dictCons'
import Template from '@/views/instance/Template' import Template from '@/views/instance/Template'
import Coolbutton from '@/components/coolbutton' import Coolbutton from '@/components/coolbutton'
export default { export default {
name: 'LoginInfo', name: 'LoginInfo',
components: { Template, Coolbutton }, components: { Template, Coolbutton },
......
...@@ -90,8 +90,8 @@ ...@@ -90,8 +90,8 @@
<el-pagination <el-pagination
background background
layout="prev, pager, next" layout="prev, pager, next"
:total="1000"> :total="1000"
</el-pagination> />
<!-- TODO: 添加或修改设备配置对话框 --> <!-- TODO: 添加或修改设备配置对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
...@@ -157,6 +157,7 @@ ...@@ -157,6 +157,7 @@
<script> <script>
// TODO: 导入外部已经封装好的button组件 // TODO: 导入外部已经封装好的button组件
import Coolbutton from '@/components/coolbutton' import Coolbutton from '@/components/coolbutton'
export default { export default {
name: 'Role', name: 'Role',
components: { Coolbutton }, components: { Coolbutton },
...@@ -168,7 +169,7 @@ export default { ...@@ -168,7 +169,7 @@ export default {
nameParent: '删除', nameParent: '删除',
resetName: '重置', resetName: '重置',
addName: '新增', addName: '新增',
application:'申请领用', application: '申请领用',
updataName: '修改', updataName: '修改',
size: 'mini', size: 'mini',
smallSize: 'small', smallSize: 'small',
...@@ -220,9 +221,9 @@ export default { ...@@ -220,9 +221,9 @@ export default {
deviceName: '', deviceName: '',
deviceId: '', deviceId: '',
LOT: '', LOT: '',
location:'', location: '',
ply:'', ply: '',
state:'', state: '',
flag: '1', flag: '1',
remark: '', remark: '',
createTime: new Date(), createTime: new Date(),
...@@ -234,10 +235,10 @@ export default { ...@@ -234,10 +235,10 @@ export default {
deviceName: '', deviceName: '',
deviceId: '', deviceId: '',
LOT: '', LOT: '',
location:'', location: '',
ply:'', ply: '',
state:'', state: '',
state:'', state: '',
flag: '1', flag: '1',
createTime: new Date(), createTime: new Date(),
updataTime: new Date(), updataTime: new Date(),
...@@ -248,9 +249,9 @@ export default { ...@@ -248,9 +249,9 @@ export default {
deviceName: '', deviceName: '',
deviceId: '', deviceId: '',
LOT: '', LOT: '',
location:'', location: '',
ply:'', ply: '',
state:'', state: '',
flag: '1', flag: '1',
createTime: new Date(), createTime: new Date(),
updataTime: new Date(), updataTime: new Date(),
...@@ -258,26 +259,26 @@ export default { ...@@ -258,26 +259,26 @@ export default {
}, },
// TODO: 模拟测试数据 // TODO: 模拟测试数据
simulateDeviceList: [{ 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: '设备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: '设备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: '设备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: '设备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: '设备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: '设备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: '设备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: '设备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: '设备10', deviceId: '00010', flag: 2, LOT: '0010', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '通过'
}, }
], ],
...@@ -336,9 +337,9 @@ export default { ...@@ -336,9 +337,9 @@ export default {
this.form = { this.form = {
deviceName: '', deviceName: '',
deviceId: '', deviceId: '',
location:'', location: '',
ply:'', ply: '',
state:'', state: '',
flag: '1', flag: '1',
createTime: new Date(), createTime: new Date(),
updataTime: new Date(), updataTime: new Date(),
......
...@@ -2,16 +2,35 @@ ...@@ -2,16 +2,35 @@
<div class="app-container"> <div class="app-container">
<el-form ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true"> <el-form ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true">
<el-form-item label="设备名称" prop="roleName"> <el-form-item label="设备名称" prop="roleName">
<el-input v-model="queryParams.roleName" placeholder="请输入设备名称" clearable :maxlength="30" size="small" <el-input
style="width: 150px" @keyup.enter.native="handleQuery" /> v-model="queryParams.roleName"
placeholder="请输入设备名称"
clearable
:maxlength="30"
size="small"
style="width: 150px"
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item label="设备编码" prop="roleKey"> <el-form-item label="设备编码" prop="roleKey">
<el-input v-model="queryParams.roleKey" placeholder="请输入设备编码" clearable size="small" style="width: 150px" <el-input
@keyup.enter.native="handleQuery" /> v-model="queryParams.roleKey"
placeholder="请输入设备编码"
clearable
size="small"
style="width: 150px"
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item label="lot" prop="roleKey"> <el-form-item label="lot" prop="roleKey">
<el-input v-model="queryParams.roleKey" placeholder="请输入设备lot" clearable size="small" style="width: 150px" <el-input
@keyup.enter.native="handleQuery" /> v-model="queryParams.roleKey"
placeholder="请输入设备lot"
clearable
size="small"
style="width: 150px"
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" size="small" icon="el-icon-search" @click="handleQuery">查询</el-button> <el-button type="primary" size="small" icon="el-icon-search" @click="handleQuery">查询</el-button>
...@@ -20,18 +39,18 @@ ...@@ -20,18 +39,18 @@
<el-form-item /> <el-form-item />
</div> </div>
</el-form> </el-form>
<div class="placeholder"></div> <div class="placeholder" />
<div class="Role" style="width: 100%; height: 600px; display: flex; padding-left: 100px"> <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 class="left-charts" style="width: 50%; display: flex; flex-direction: column;">
<div id="myChart1" style="flex: 1; margin-bottom: 100px;"></div> <div id="myChart1" style="flex: 1; margin-bottom: 100px;" />
<div id="myChart2" style="flex: 1;"></div> <div id="myChart2" style="flex: 1;" />
</div> </div>
<!--右边两个图--> <!--右边两个图-->
<div class="right-charts" style="width: 50%; display: flex; flex-direction: column;"> <div class="right-charts" style="width: 50%; display: flex; flex-direction: column;">
<div id="myChart5" style="flex: 1; margin-bottom: 60px;"></div> <div id="myChart5" style="flex: 1; margin-bottom: 60px;" />
<div id="myChart3" style="flex: 1;"></div> <div id="myChart3" style="flex: 1;" />
</div> </div>
</div> </div>
</div> </div>
...@@ -39,17 +58,17 @@ ...@@ -39,17 +58,17 @@
<script> <script>
import { import {
listRole,
getRole,
delRole,
addRole, addRole,
updateRole, changeRoleStatus,
exportRole,
dataScope, dataScope,
changeRoleStatus delRole,
exportRole,
getRole,
listRole,
updateRole
} from '@/api/system/role' } from '@/api/system/role'
import { roleMenuTreeselectMC, treeselect as menuTreeselect, roleMenuTreeselect } from '@/api/system/menu' import {roleMenuTreeselect, roleMenuTreeselectMC, treeselect as menuTreeselect} from '@/api/system/menu'
import { treeselect as deptTreeselect, roleDeptTreeselect } from '@/api/system/dept' import {roleDeptTreeselect, treeselect as deptTreeselect} from '@/api/system/dept'
// import { getRolesByInsId } from '../../../api/businessManage/template' // import { getRolesByInsId } from '../../../api/businessManage/template'
import * as echarts from 'echarts' import * as echarts from 'echarts'
...@@ -186,8 +205,8 @@ export default { ...@@ -186,8 +205,8 @@ export default {
deptOptions: [] deptOptions: []
} }
}, },
mounted: function () { mounted: function() {
this.$nextTick(function () { this.$nextTick(function() {
this.drawLine5('myChart5') this.drawLine5('myChart5')
}) })
...@@ -328,7 +347,7 @@ export default { ...@@ -328,7 +347,7 @@ export default {
shadowOffsetX: 0, shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)' shadowColor: 'rgba(0, 0, 0, 0.5)'
}, },
color: function (params) { color: function(params) {
// 自定义颜色 // 自定义颜色
var colorList = ['red', '#16deb6', '#b24999'] var colorList = ['red', '#16deb6', '#b24999']
return colorList[params.dataIndex] return colorList[params.dataIndex]
...@@ -393,7 +412,7 @@ export default { ...@@ -393,7 +412,7 @@ export default {
shadowOffsetX: 0, shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)' shadowColor: 'rgba(0, 0, 0, 0.5)'
}, },
color: function (params) { color: function(params) {
// 自定义颜色 // 自定义颜色
var colorList = ['red', '#7fdcca'] var colorList = ['red', '#7fdcca']
return colorList[params.dataIndex] return colorList[params.dataIndex]
...@@ -518,14 +537,14 @@ export default { ...@@ -518,14 +537,14 @@ export default {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(function () { }).then(function() {
return changeRoleStatus(row.businessId, row.flag) return changeRoleStatus(row.businessId, row.flag)
}).then(() => { }).then(() => {
this.$message({ this.$message({
message: text + '成功', message: text + '成功',
type: 'success' type: 'success'
}) })
}).catch(function () { }).catch(function() {
row.flag = row.flag === '0' ? '1' : '0' row.flag = row.flag === '0' ? '1' : '0'
}) })
}, },
...@@ -662,7 +681,7 @@ export default { ...@@ -662,7 +681,7 @@ export default {
this.title = '分配数据权限' this.title = '分配数据权限'
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm: function () { submitForm: function() {
this.$refs['form'].validate(valid => { this.$refs['form'].validate(valid => {
if (valid) { if (valid) {
this.form.menuCheckStrictly = false this.form.menuCheckStrictly = false
...@@ -685,7 +704,7 @@ export default { ...@@ -685,7 +704,7 @@ export default {
}) })
}, },
/** 提交按钮(数据权限) */ /** 提交按钮(数据权限) */
submitDataScope: function () { submitDataScope: function() {
if (this.form.businessId !== undefined && this.form.menuId !== undefined) { if (this.form.businessId !== undefined && this.form.menuId !== undefined) {
this.form.deptIds = this.getDeptAllCheckedKeys() this.form.deptIds = this.getDeptAllCheckedKeys()
dataScope(this.form).then(response => { dataScope(this.form).then(response => {
...@@ -702,7 +721,7 @@ export default { ...@@ -702,7 +721,7 @@ export default {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(function () { }).then(function() {
return delRole(roleIds) return delRole(roleIds)
}).then(() => { }).then(() => {
this.getList() this.getList()
...@@ -710,7 +729,7 @@ export default { ...@@ -710,7 +729,7 @@ export default {
message: '删除成功', message: '删除成功',
type: 'success' type: 'success'
}) })
}).catch(function () { }).catch(function() {
}) })
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
...@@ -720,7 +739,7 @@ export default { ...@@ -720,7 +739,7 @@ export default {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(function () { }).then(function() {
return exportRole(queryParams).then(response => { return exportRole(queryParams).then(response => {
const blob = new Blob([response]) const blob = new Blob([response])
const downloadElement = document.createElement('a') 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